Skip to content

Commit fc7e475

Browse files
committed
tests: ignore asyncio related warning in test_deprecation_warnings
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
1 parent 2500025 commit fc7e475

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/integration/cqlengine/model/test_model.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,9 @@ class SensitiveModel(Model):
256256
rows[-1]
257257
rows[-1:]
258258

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

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

0 commit comments

Comments
 (0)