Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion t/Pyjo/Steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ async def nap(seconds):
Pyjo.IOLoop.remove(timer)
value, slept = result['value']
is_ok(value, None, 'nothing, non-blocking')
ok(slept >= 0.2, 'slept, non-blocking')
# A timer of an event loop on libuv, as the ones of uvloop and gevent, counts whole milliseconds of a clock that
# libuv rounds down, so it may be due up to a millisecond early by time.monotonic
ok(slept >= 0.19, 'slept, non-blocking')
ok(len(ticks) >= 3, 'other events meanwhile')

async def retried():
Expand Down
4 changes: 3 additions & 1 deletion t/docs/Steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ async def sleeps():
ok(Steps(sleeps()).run(ua) >= 0.6, 'sleeps, blocking')
result = []
Pyjo.Steps.new(sleeps()).run_p(ua).then(result.append).wait()
ok(result[0] >= 0.6, 'sleeps, non-blocking')
# A timer of an event loop on libuv, as the ones of uvloop and gevent, counts whole milliseconds of a clock that
# libuv rounds down, so each one may be due up to a millisecond early by time.monotonic
ok(result[0] >= 0.59, 'sleeps, non-blocking')

with subtest('Steps'):

Expand Down
Loading