mirror of
https://github.com/django/django.git
synced 2025-08-30 15:27:40 +00:00
Refs #31811 -- Added optional timing outputs to the test runner.
This commit is contained in:
parent
21768a99f4
commit
61a0ba43cf
9 changed files with 144 additions and 38 deletions
|
@ -14,7 +14,7 @@ from django.core.management.base import SystemCheckError
|
|||
from django.test import TransactionTestCase, skipUnlessDBFeature, testcases
|
||||
from django.test.runner import DiscoverRunner
|
||||
from django.test.testcases import connections_support_transactions
|
||||
from django.test.utils import dependency_ordered
|
||||
from django.test.utils import captured_stderr, dependency_ordered
|
||||
|
||||
from .models import B, Person, Through
|
||||
|
||||
|
@ -148,6 +148,11 @@ class ManageCommandTests(unittest.TestCase):
|
|||
with self.assertRaises(AttributeError):
|
||||
call_command('test', 'sites', testrunner='test_runner.NonexistentRunner')
|
||||
|
||||
def test_time_recorded(self):
|
||||
with captured_stderr() as stderr:
|
||||
call_command('test', '--timing', 'sites', testrunner='test_runner.tests.MockTestRunner')
|
||||
self.assertIn('Total run took', stderr.getvalue())
|
||||
|
||||
|
||||
class CustomTestRunnerOptionsSettingsTests(AdminScriptTestCase):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue