mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
merge in patch from tim golden to fix contextmanager support for mp.Lock()
This commit is contained in:
parent
d7bf8a5478
commit
82eb5902ce
4 changed files with 9 additions and 2 deletions
|
@ -546,6 +546,10 @@ class _TestLock(BaseTestCase):
|
|||
self.assertEqual(lock.release(), None)
|
||||
self.assertRaises((AssertionError, RuntimeError), lock.release)
|
||||
|
||||
def test_lock_context(self):
|
||||
with self.Lock():
|
||||
pass
|
||||
|
||||
|
||||
class _TestSemaphore(BaseTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue