summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDani Alcala <112832187+clavedeluna@users.noreply.github.com>2023-01-31 09:44:44 -0300
committerGitHub <noreply@github.com>2023-01-31 13:44:44 +0100
commit635a211296ae8dbafbd9b94b56fe5472f7534c8a (patch)
treeccd63e37ece7808be2fefdb42b56001ff4eaf4bc /tests
parenta31da6fe388ad98cca51b734e3201d78d717c68c (diff)
downloadastroid-git-635a211296ae8dbafbd9b94b56fe5472f7534c8a.tar.gz
Add Lock to multiprocessing (#1976)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com> Co-authored-by: Marc Mueller <30130371+cdce8p@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)