From 5b5002462eb784852aa31131870176f51061b396 Mon Sep 17 00:00:00 2001 From: Israel Fruchter Date: Thu, 12 Oct 2023 23:36:07 +0300 Subject: [PATCH] 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 --- tests/integration/cqlengine/model/test_model.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/integration/cqlengine/model/test_model.py b/tests/integration/cqlengine/model/test_model.py index 859facf0e1..73096e1b5d 100644 --- a/tests/integration/cqlengine/model/test_model.py +++ b/tests/integration/cqlengine/model/test_model.py @@ -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.",