Skip to content

Commit

Permalink
tests: ignore asyncio related warning in test_deprecation_warnings
Browse files Browse the repository at this point in the history
since python3.8 we have this warning:
```
DeprecationWarning('The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.')
```

and it's o.k. to have it since on Python 3.10 and up, we stop using that argument
  • Loading branch information
fruch committed Oct 12, 2023
1 parent 56e4e62 commit 7b8a111
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/integration/cqlengine/model/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,9 @@ class SensitiveModel(Model):
rows[-1]
rows[-1:]

# Asyncio complains loudly about old syntax on python 3.7+, so get rid of all of those
relevant_warnings = [warn for warn in w if "with (yield from lock)" not in str(warn.message)]
# ignore DeprecationWarning('The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.')
relevant_warnings = [warn for warn in w if "The loop argument is deprecated" not in str(warn.message)]

self.assertEqual(len(relevant_warnings), 4)
self.assertIn("__table_name_case_sensitive__ will be removed in 4.0.", str(relevant_warnings[0].message))
self.assertIn("__table_name_case_sensitive__ will be removed in 4.0.", str(relevant_warnings[1].message))
self.assertIn("ModelQuerySet indexing with negative indices support will be removed in 4.0.",
Expand Down

0 comments on commit 7b8a111

Please sign in to comment.