summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-01-31 13:54:05 +0100
committerGitHub <noreply@github.com>2023-01-31 13:54:05 +0100
commit2cdf6cef10ab70495522d09046f4ee0ca5484f9f (patch)
treea0517380415286a8181be45617182680dcb3c086 /tests
parente18d6637a54163246585fcc6e1d09e1431b2b417 (diff)
downloadastroid-git-2cdf6cef10ab70495522d09046f4ee0ca5484f9f.tar.gz
Add Lock to multiprocessing (#1976) (#1996)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> (cherry picked from commit 635a211296ae8dbafbd9b94b56fe5472f7534c8a) Co-authored-by: Dani Alcala <112832187+clavedeluna@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unittest_brain.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittest_brain.py b/tests/unittest_brain.py
index 0ffccb35..30594c38 100644
--- a/tests/unittest_brain.py
+++ b/tests/unittest_brain.py
@@ -711,6 +711,7 @@ class MultiprocessingBrainTest(unittest.TestCase):
joinable_queue = manager.JoinableQueue()
event = manager.Event()
rlock = manager.RLock()
+ lock = manager.Lock()
bounded_semaphore = manager.BoundedSemaphore()
condition = manager.Condition()
barrier = manager.Barrier()
@@ -736,6 +737,10 @@ class MultiprocessingBrainTest(unittest.TestCase):
rlock_name = "threading._RLock"
self.assertEqual(rlock.qname(), rlock_name)
+ lock = next(module["lock"].infer())
+ lock_name = "threading.lock"
+ self.assertEqual(lock.qname(), lock_name)
+
bounded_semaphore = next(module["bounded_semaphore"].infer())
semaphore_name = "threading.BoundedSemaphore"
self.assertEqual(bounded_semaphore.qname(), semaphore_name)