5bce0f2a892ae2bd190b496fb4716af8a60fb249
[packages/trusty/python-eventlet.git] / python-eventlet / tests / isolated / patcher_threading_condition.py
1 # Issue #185: test threading.Condition with monkey-patching
2 import eventlet
3
4 # no standard tests in this file, ignore
5 __test__ = False
6
7
8 if __name__ == '__main__':
9     eventlet.monkey_patch()
10
11     import threading
12
13     def func(c):
14         with c:
15             c.notify()
16
17     c = threading.Condition()
18     with c:
19         t = threading.Thread(target=func, args=(c,))
20         t.start()
21         c.wait()
22
23     print('pass')