bpo-4080: unittest durations (#12271)

This commit is contained in:
Giampaolo Rodola 2023-04-03 00:12:51 +02:00 committed by GitHub
parent a0305c5fdf
commit 6883007a86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 227 additions and 34 deletions

View file

@ -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