mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-46530: add "thread_time"
to test_time.test_get_clock_info
(#30913)
This commit is contained in:
parent
f10dafc430
commit
c27a33132b
1 changed files with 17 additions and 11 deletions
|
@ -556,12 +556,18 @@ class TimeTestCase(unittest.TestCase):
|
|||
self.assertRaises(ValueError, time.ctime, float("nan"))
|
||||
|
||||
def test_get_clock_info(self):
|
||||
clocks = ['monotonic', 'perf_counter', 'process_time', 'time']
|
||||
clocks = [
|
||||
'monotonic',
|
||||
'perf_counter',
|
||||
'process_time',
|
||||
'time',
|
||||
'thread_time',
|
||||
]
|
||||
|
||||
for name in clocks:
|
||||
with self.subTest(name=name):
|
||||
info = time.get_clock_info(name)
|
||||
|
||||
#self.assertIsInstance(info, dict)
|
||||
self.assertIsInstance(info.implementation, str)
|
||||
self.assertNotEqual(info.implementation, '')
|
||||
self.assertIsInstance(info.monotonic, bool)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue