diff options
author | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2019-05-13 01:34:44 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2019-05-13 01:34:44 (GMT) |
commit | e2500610c62673f42371b54fb0e4de83e4b33146 (patch) | |
tree | 93cb4b92e995d87613fa249d4195f069229b3518 /Lib/test/test_time.py | |
parent | 5d23e282af69d404a3430bb95aefe371112817b3 (diff) | |
download | cpython-e2500610c62673f42371b54fb0e4de83e4b33146.zip cpython-e2500610c62673f42371b54fb0e4de83e4b33146.tar.gz cpython-e2500610c62673f42371b54fb0e4de83e4b33146.tar.bz2 |
bpo-36895: remove time.clock() as per removal notice. (GH-13270)
`time.clock()` was deprecated in 3.3, and marked for removal removal in
3.8; this thus remove it from the time module.
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r-- | Lib/test/test_time.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 42799b2..f790d43 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -88,17 +88,6 @@ class TimeTestCase(unittest.TestCase): check_ns(time.clock_gettime(time.CLOCK_REALTIME), time.clock_gettime_ns(time.CLOCK_REALTIME)) - @unittest.skipUnless(hasattr(time, 'clock'), - 'need time.clock()') - def test_clock(self): - with self.assertWarns(DeprecationWarning): - time.clock() - - with self.assertWarns(DeprecationWarning): - info = time.get_clock_info('clock') - self.assertTrue(info.monotonic) - self.assertFalse(info.adjustable) - @unittest.skipUnless(hasattr(time, 'clock_gettime'), 'need time.clock_gettime()') def test_clock_realtime(self): @@ -553,15 +542,9 @@ class TimeTestCase(unittest.TestCase): def test_get_clock_info(self): clocks = ['monotonic', 'perf_counter', 'process_time', 'time'] - if hasattr(time, 'clock'): - clocks.append('clock') for name in clocks: - if name == 'clock': - with self.assertWarns(DeprecationWarning): - info = time.get_clock_info('clock') - else: - info = time.get_clock_info(name) + info = time.get_clock_info(name) #self.assertIsInstance(info, dict) self.assertIsInstance(info.implementation, str) |