]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Whitespace normalization.
authorTim Peters <tim@python.org>
Wed, 9 Oct 2013 02:29:27 +0000 (21:29 -0500)
committerTim Peters <tim@python.org>
Wed, 9 Oct 2013 02:29:27 +0000 (21:29 -0500)
Lib/test/test_threading.py

index 4d30ee4e07b2119f7040a24a70d4a22225b1da43..7bd3082842c1cd480e0ff70ed32d17fb760a4bf7 100644 (file)
@@ -600,22 +600,22 @@ class ThreadTests(BaseTestCase):
         self.assertIn(LOOKING_FOR, repr(t)) # we waited at least 5 seconds
 
     def test_BoundedSemaphore_limit(self):
-       # BoundedSemaphore should raise ValueError if released too often.
-       for limit in range(1, 10):
-           bs = threading.BoundedSemaphore(limit)
-           threads = [threading.Thread(target=bs.acquire)
-                      for _ in range(limit)]
-           for t in threads:
-               t.start()
-           for t in threads:
-               t.join()
-           threads = [threading.Thread(target=bs.release)
-                      for _ in range(limit)]
-           for t in threads:
-               t.start()
-           for t in threads:
-               t.join()
-           self.assertRaises(ValueError, bs.release)
+        # BoundedSemaphore should raise ValueError if released too often.
+        for limit in range(1, 10):
+            bs = threading.BoundedSemaphore(limit)
+            threads = [threading.Thread(target=bs.acquire)
+                       for _ in range(limit)]
+            for t in threads:
+                t.start()
+            for t in threads:
+                t.join()
+            threads = [threading.Thread(target=bs.release)
+                       for _ in range(limit)]
+            for t in threads:
+                t.start()
+            for t in threads:
+                t.join()
+            self.assertRaises(ValueError, bs.release)
 
 class ThreadJoinOnShutdown(BaseTestCase):