From 7d2ab91d23f28ca3510e6fb12c9609a91c888aa7 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 12 Jan 2009 15:33:49 +0600 Subject: [PATCH] added test_thread__boundedsem.py --- greentest/test_thread__boundedsem.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 greentest/test_thread__boundedsem.py diff --git a/greentest/test_thread__boundedsem.py b/greentest/test_thread__boundedsem.py new file mode 100644 index 0000000..7cd00c6 --- /dev/null +++ b/greentest/test_thread__boundedsem.py @@ -0,0 +1,11 @@ +"""Test that BoundedSemaphore with a very high bound is as good as unbounded one""" +from eventlet import coros +from eventlet.green import thread + +def allocate_lock(): + return coros.semaphore(1, 9999) + +thread.allocate_lock = allocate_lock +thread.LockType = coros.BoundedSemaphore + +execfile('test_thread.py')