Commit 3a7dc2df authored by Denis Bilenko's avatar Denis Bilenko

rename test_hub_shutdown.py to test_hub_join() and extend it a bit

--HG--
rename : greentest/test_hub_shutdown.py => greentest/test_hub_join.py
parent 38739ca5
import gevent
# hub.join() guarantees that loop has exited cleanly
res = gevent.get_hub().join()
assert res is True, res
res = gevent.get_hub().join()
assert res is True, res
# but it is still possible to use gevent afterwards
gevent.sleep(0.01)
res = gevent.get_hub().join()
assert res is True, res
"""Tests that Hub.join() works even when hub is not yet started"""
# rename to test_hub_join()?
import gevent.hub
res = gevent.hub.get_hub().join()
assert res is True, res
res = gevent.hub.get_hub().join()
assert res is True, res
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