1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #32641 -- Made DiscoverRunner's "Found X tests" message work for finding one test.

This also removes passing level to log() as logging.INFO is the default.
This commit is contained in:
Chris Jerdonek 2021-06-02 03:53:09 -07:00 committed by GitHub
parent ec2727efef
commit 1b4d1675b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -669,7 +669,7 @@ class DiscoverRunner:
# found or that couldn't be loaded due to syntax errors.
test_types = (unittest.loader._FailedTest, *self.reorder_by)
all_tests = list(reorder_tests(all_tests, test_types, self.reverse))
self.log('Found %d tests.' % len(all_tests), level=logging.INFO)
self.log('Found %d test(s).' % len(all_tests))
suite = self.test_suite(all_tests)
if self.parallel > 1:

View File

@ -306,7 +306,7 @@ class DiscoverRunnerTests(SimpleTestCase):
'test_runner_apps.sample.tests_sample.TestDjangoTestCase',
'test_runner_apps.simple',
])
self.assertIn('Found 14 tests.\n', stdout.getvalue())
self.assertIn('Found 14 test(s).\n', stdout.getvalue())
def test_pdb_with_parallel(self):
msg = (