mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-4080: unittest durations (#12271)
This commit is contained in:
parent
a0305c5fdf
commit
6883007a86
12 changed files with 227 additions and 34 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue