Made the boundedsem test play nicer with the other tests...it still stomps on them though.

This commit is contained in:
Ryan Williams
2009-11-28 18:50:12 -05:00
parent b42db6044e
commit cdfc4e171d

View File

@@ -5,8 +5,14 @@ from eventlet.green import thread
def allocate_lock():
return coros.semaphore(1, 9999)
original_allocate_lock = thread.allocate_lock
thread.allocate_lock = allocate_lock
original_LockType = thread.LockType
thread.LockType = coros.BoundedSemaphore
import os.path
execfile(os.path.join(os.path.dirname(__file__), 'test_thread.py'))
try:
import os.path
execfile(os.path.join(os.path.dirname(__file__), 'test_thread.py'))
finally:
thread.allocate_lock = original_allocate_lock
thread.LockType = original_LockType