diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-01-17 22:09:56 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-01-20 14:07:28 +0100 |
| commit | f5772de69679efb54129ac1cbca3579b512778af (patch) | |
| tree | ab215760e2e77124bbb8970b0913c2a99ae68743 /tests/utils_tests/test_functional.py | |
| parent | 61dae11df52fae71fc3050974ac459f362c9dfd7 (diff) | |
Fixed #36005 -- Dropped support for Python 3.10 and 3.11.
Diffstat (limited to 'tests/utils_tests/test_functional.py')
| -rw-r--r-- | tests/utils_tests/test_functional.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/utils_tests/test_functional.py b/tests/utils_tests/test_functional.py index fa23debb4d..8b5c330bcf 100644 --- a/tests/utils_tests/test_functional.py +++ b/tests/utils_tests/test_functional.py @@ -1,6 +1,5 @@ from django.test import SimpleTestCase from django.utils.functional import cached_property, classproperty, lazy -from django.utils.version import PY312 class FunctionalTests(SimpleTestCase): @@ -133,14 +132,10 @@ class FunctionalTests(SimpleTestCase): "Cannot assign the same cached_property to two different names ('a' and " "'b')." ) - if PY312: - error_type = TypeError - msg = type_msg - else: - error_type = RuntimeError - msg = "Error calling __set_name__" + error_type = TypeError + msg = type_msg - with self.assertRaisesMessage(error_type, msg) as ctx: + with self.assertRaisesMessage(error_type, msg): class ReusedCachedProperty: @cached_property @@ -149,9 +144,6 @@ class FunctionalTests(SimpleTestCase): b = a - if not PY312: - self.assertEqual(str(ctx.exception.__context__), str(TypeError(type_msg))) - def test_cached_property_reuse_same_name(self): """ Reusing a cached_property on different classes under the same name is |
