Commit 03967466 authored by Denis Bilenko's avatar Denis Bilenko

add test__core_active_event.py

parent 8e3e205c
import gevent
called = []
def f():
called.append(1)
x = gevent.core.active_event(f)
assert x.pending == 1, x.pending
gevent.sleep(0)
assert x.pending == 0, x.pending
assert called == [1], called
x = gevent.core.active_event(f)
assert x.pending == 1, x.pending
x.cancel()
assert x.pending == 0, x.pending
gevent.sleep(0)
assert called == [1], called
assert x.pending == 0, x.pending
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment