MCPcopy Index your code
hub / github.com/python/cpython / test_sleep

Method test_sleep

Lib/test/_test_eintr.py:394–399  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

392 """ EINTR tests for the time module. """
393
394 def test_sleep(self):
395 t0 = time.monotonic()
396 time.sleep(self.sleep_time)
397 self.stop_alarm()
398 dt = time.monotonic() - t0
399 self.check_elapsed_time(dt)
400
401
402@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")

Callers

nothing calls this directly

Calls 3

stop_alarmMethod · 0.80
check_elapsed_timeMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected