Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_thread.py @ 57129:cd360ac58cd2 legacy-trunk
Issue #7270: Add some dedicated unit tests for multi-thread synchronization
primitives such as Lock, RLock, Condition, Event and Semaphore.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Fri, 06 Nov 2009 22:34:35 +0000 |
| parents | 29fe5e7bd6ee |
| children | 4afc50d15544 |
line wrap: on
line diff
--- a/Lib/test/test_thread.py Thu Nov 05 23:54:42 2009 +0000 +++ b/Lib/test/test_thread.py Fri Nov 06 22:34:35 2009 +0000 @@ -6,6 +6,7 @@ import time import weakref +from test import lock_tests NUMTASKS = 10 NUMTRIPS = 3 @@ -191,8 +192,12 @@ self.done_mutex.release() +class LockTests(lock_tests.LockTests): + locktype = thread.allocate_lock + + def test_main(): - test_support.run_unittest(ThreadRunningTests, BarrierTest) + test_support.run_unittest(ThreadRunningTests, BarrierTest, LockTests) if __name__ == "__main__": test_main()
