diff options
Diffstat (limited to 'Lib/test/lock_tests.py')
| -rw-r--r-- | Lib/test/lock_tests.py | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py index 1cbcea2..136f1c3 100644 --- a/Lib/test/lock_tests.py +++ b/Lib/test/lock_tests.py @@ -82,7 +82,13 @@ class BaseLockTests(BaseTestCase):      def test_repr(self):          lock = self.locktype() -        repr(lock) +        self.assertRegex(repr(lock), "<unlocked .* object (.*)?at .*>") +        del lock + +    def test_locked_repr(self): +        lock = self.locktype() +        lock.acquire() +        self.assertRegex(repr(lock), "<locked .* object (.*)?at .*>")          del lock      def test_acquire_destroy(self):  | 
