summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unittest/test_program.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2023-04-02 22:12:51 (GMT)
committerGitHub <noreply@github.com>2023-04-02 22:12:51 (GMT)
commit6883007a86bdf0d7cf4560b949fd5e577dab1013 (patch)
treeb5585b8135e1136d9b567dda62e887a27033b392 /Lib/test/test_unittest/test_program.py
parenta0305c5fdfdef7a362d0262c54399c4a6013d1ea (diff)
downloadcpython-6883007a86bdf0d7cf4560b949fd5e577dab1013.zip
cpython-6883007a86bdf0d7cf4560b949fd5e577dab1013.tar.gz
cpython-6883007a86bdf0d7cf4560b949fd5e577dab1013.tar.bz2
bpo-4080: unittest durations (#12271)
Diffstat (limited to 'Lib/test/test_unittest/test_program.py')
-rw-r--r--Lib/test/test_unittest/test_program.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_unittest/test_program.py b/Lib/test/test_unittest/test_program.py
index 3645bcf..f138f68 100644
--- a/Lib/test/test_unittest/test_program.py
+++ b/Lib/test/test_unittest/test_program.py
@@ -284,6 +284,7 @@ class TestCommandLineArgs(unittest.TestCase):
program.failfast = 'failfast'
program.buffer = 'buffer'
program.warnings = 'warnings'
+ program.durations = '5'
program.runTests()
@@ -291,7 +292,8 @@ class TestCommandLineArgs(unittest.TestCase):
'failfast': 'failfast',
'buffer': 'buffer',
'tb_locals': False,
- 'warnings': 'warnings'})
+ 'warnings': 'warnings',
+ 'durations': '5'})
self.assertEqual(FakeRunner.test, 'test')
self.assertIs(program.result, RESULT)
@@ -320,7 +322,8 @@ class TestCommandLineArgs(unittest.TestCase):
'failfast': False,
'tb_locals': True,
'verbosity': 1,
- 'warnings': None})
+ 'warnings': None,
+ 'durations': None})
def testRunTestsOldRunnerClass(self):
program = self.program
@@ -333,6 +336,7 @@ class TestCommandLineArgs(unittest.TestCase):
program.failfast = 'failfast'
program.buffer = 'buffer'
program.test = 'test'
+ program.durations = '0'
program.runTests()
@@ -356,6 +360,7 @@ class TestCommandLineArgs(unittest.TestCase):
program = self.program
program.catchbreak = True
+ program.durations = None
program.testRunner = FakeRunner