Commit 7fb55e27 authored by Jason Madden's avatar Jason Madden

test_hub_join -> test__hub_join.py

parent 5171072c
import unittest
import gevent
class Test(unittest.TestCase):
def test(self):
# hub.join() guarantees that loop has exited cleanly
res = gevent.get_hub().join()
self.assertTrue(res)
res = gevent.get_hub().join()
self.assertTrue(res)
# but it is still possible to use gevent afterwards
gevent.sleep(0.01)
res = gevent.get_hub().join()
self.assertTrue(res)
if __name__ == '__main__':
unittest.main()
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
......@@ -4,3 +4,4 @@ test___monitor.py
test__monkey_scope.py
test__ares_timeout.py
test__close_backend_fd.py
test__hub_join.py
......@@ -22,3 +22,4 @@ test__monkey_scope.py
test__iwait.py
test__ares_timeout.py
test__close_backend_fd.py
test__hub_join.py
......@@ -30,7 +30,7 @@ test__GreenletExit.py
test__greenlet.py
test__greenletset.py
# uses socket test__greenness.py
test_hub_join.py
test__hub_join.py
test_hub_join_timeout.py
# uses socket test__hub.py
test_issue112.py
......
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