File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
620620class ThreadJoinOnShutdown (BaseTestCase ):
621621
You can’t perform that action at this time.
0 commit comments