diff options
Diffstat (limited to 'tests/test_runner/tests.py')
| -rw-r--r-- | tests/test_runner/tests.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py index fba8dd3b6f..d66ece4005 100644 --- a/tests/test_runner/tests.py +++ b/tests/test_runner/tests.py @@ -15,7 +15,7 @@ from django import db from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management import call_command -from django.core.management.base import CommandError, SystemCheckError +from django.core.management.base import SystemCheckError from django.test import SimpleTestCase, TransactionTestCase, skipUnlessDBFeature from django.test.runner import ( DiscoverRunner, @@ -32,7 +32,6 @@ from django.test.utils import ( get_unique_databases_and_mirrors, iter_test_cases, ) -from django.utils.version import PY312 from .models import B, Person, Through @@ -479,7 +478,6 @@ class ManageCommandTests(unittest.TestCase): ) self.assertIn("Total run took", stderr.getvalue()) - @unittest.skipUnless(PY312, "unittest --durations option requires Python 3.12") def test_durations(self): with captured_stderr() as stderr: call_command( @@ -490,17 +488,6 @@ class ManageCommandTests(unittest.TestCase): ) self.assertIn("durations=10", stderr.getvalue()) - @unittest.skipIf(PY312, "unittest --durations option requires Python 3.12") - def test_durations_lt_py312(self): - msg = "Error: unrecognized arguments: --durations=10" - with self.assertRaises(CommandError, msg=msg): - call_command( - "test", - "--durations=10", - "sites", - testrunner="test_runner.tests.MockTestRunner", - ) - # Isolate from the real environment. @mock.patch.dict(os.environ, {}, clear=True) |
