diff options
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/runner.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/django/test/runner.py b/django/test/runner.py index 8e6c29b0b4..e14c6381eb 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -21,7 +21,6 @@ from django.test.utils import ( teardown_test_environment, ) from django.utils.datastructures import OrderedSet -from django.utils.version import PY37 try: import ipdb as pdb @@ -240,8 +239,8 @@ failure and get a correct traceback. self.stop_if_failfast() def addSubTest(self, test, subtest, err): - # Follow Python 3.5's implementation of unittest.TestResult.addSubTest() - # by not doing anything when a subtest is successful. + # Follow Python's implementation of unittest.TestResult.addSubTest() by + # not doing anything when a subtest is successful. if err is not None: # Call check_picklable() before check_subtest_picklable() since # check_picklable() performs the tblib check. @@ -540,15 +539,14 @@ class DiscoverRunner: 'Output timings, including database set up and total run time.' ), ) - if PY37: - parser.add_argument( - '-k', action='append', dest='test_name_patterns', - help=( - 'Only run test methods and classes that match the pattern ' - 'or substring. Can be used multiple times. Same as ' - 'unittest -k option.' - ), - ) + parser.add_argument( + '-k', action='append', dest='test_name_patterns', + help=( + 'Only run test methods and classes that match the pattern ' + 'or substring. Can be used multiple times. Same as ' + 'unittest -k option.' + ), + ) def setup_test_environment(self, **kwargs): setup_test_environment(debug=self.debug_mode) |
