

@unittest.skipUnless(hasattr(time, 'clock_settime'), 'need time.clock_settime()')
def test_clock_settime(self):
    t = time.clock_gettime(time.CLOCK_REALTIME)
    try:
        time.clock_settime(time.CLOCK_REALTIME, t)
    except PermissionError:
        pass
    if hasattr(time, 'CLOCK_MONOTONIC'):
        self.assertRaises(OSError, time.clock_settime, time.CLOCK_MONOTONIC, 0)

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_time.py TimeTestCase.test_clock_settime/original