-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtestlocks.py
More file actions
42 lines (28 loc) · 1.14 KB
/
testlocks.py
File metadata and controls
42 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# test the locks thingie
import unittest
import test.test_support
from .. import locks, app
from . import lock_tests
class LockTests(lock_tests.LockTests):
locktype = staticmethod(locks.Lock)
class RLockTests(lock_tests.RLockTests):
locktype = staticmethod(locks.RLock)
class EventTests(lock_tests.EventTests):
eventtype = staticmethod(locks.Event)
class ConditionAsRLockTests(lock_tests.RLockTests):
# An Condition uses an RLock by default and exports its API.
locktype = staticmethod(locks.Condition)
class ConditionTests(lock_tests.ConditionTests):
locktype = staticmethod(locks.Lock)
condtype = staticmethod(locks.Condition)
class NLConditionTests(lock_tests.NLConditionTests):
locktype = staticmethod(locks.Lock)
condtype = staticmethod(locks.NLCondition)
class SemaphoreTests(lock_tests.SemaphoreTests):
semtype = staticmethod(locks.Semaphore)
class BoundedSemaphoreTests(lock_tests.BoundedSemaphoreTests):
semtype = staticmethod(locks.BoundedSemaphore)
from .support import load_tests
if __name__ == "__main__":
app.install_stackless()
unittest.main()