Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d1b7a0

Browse files
author
Tim Peters
committed
Whitespace normalization.
1 parent e99bdb9 commit 3d1b7a0

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

Lib/test/test_threading.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -600,22 +600,22 @@ def f():
600600
self.assertIn(LOOKING_FOR, repr(t)) # we waited at least 5 seconds
601601

602602
def test_BoundedSemaphore_limit(self):
603-
# BoundedSemaphore should raise ValueError if released too often.
604-
for limit in range(1, 10):
605-
bs = threading.BoundedSemaphore(limit)
606-
threads = [threading.Thread(target=bs.acquire)
607-
for _ in range(limit)]
608-
for t in threads:
609-
t.start()
610-
for t in threads:
611-
t.join()
612-
threads = [threading.Thread(target=bs.release)
613-
for _ in range(limit)]
614-
for t in threads:
615-
t.start()
616-
for t in threads:
617-
t.join()
618-
self.assertRaises(ValueError, bs.release)
603+
# BoundedSemaphore should raise ValueError if released too often.
604+
for limit in range(1, 10):
605+
bs = threading.BoundedSemaphore(limit)
606+
threads = [threading.Thread(target=bs.acquire)
607+
for _ in range(limit)]
608+
for t in threads:
609+
t.start()
610+
for t in threads:
611+
t.join()
612+
threads = [threading.Thread(target=bs.release)
613+
for _ in range(limit)]
614+
for t in threads:
615+
t.start()
616+
for t in threads:
617+
t.join()
618+
self.assertRaises(ValueError, bs.release)
619619

620620
class ThreadJoinOnShutdown(BaseTestCase):
621621

0 commit comments

Comments
 (0)