diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index be9fb5ad5f0b17..008ba2833a7d76 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -544,20 +544,26 @@ def test_localtime_failure(self): 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: - info = time.get_clock_info(name) - - #self.assertIsInstance(info, dict) - self.assertIsInstance(info.implementation, str) - self.assertNotEqual(info.implementation, '') - self.assertIsInstance(info.monotonic, bool) - self.assertIsInstance(info.resolution, float) - # 0.0 < resolution <= 1.0 - self.assertGreater(info.resolution, 0.0) - self.assertLessEqual(info.resolution, 1.0) - self.assertIsInstance(info.adjustable, bool) + with self.subTest(name=name): + info = time.get_clock_info(name) + + self.assertIsInstance(info.implementation, str) + self.assertNotEqual(info.implementation, '') + self.assertIsInstance(info.monotonic, bool) + self.assertIsInstance(info.resolution, float) + # 0.0 < resolution <= 1.0 + self.assertGreater(info.resolution, 0.0) + self.assertLessEqual(info.resolution, 1.0) + self.assertIsInstance(info.adjustable, bool) self.assertRaises(ValueError, time.get_clock_info, 'xxx')