From ec0ff406311de88f4e2a135d784363424fe602aa Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 19 Jan 2021 08:35:16 +0100 Subject: Fixed #32355 -- Dropped support for Python 3.6 and 3.7 --- django/test/runner.py | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'django/test') 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) -- cgit v1.3