File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -2046,21 +2046,16 @@ def test_sleeping_count_with_tiny_timeout(self):
20462046 self .skipTest ('test not appropriate for {}' .format (self .TYPE ))
20472047
20482048 cond = self .Condition ()
2049- # start some processes
2050- workers = []
20512049 n = 3
2052-
2053- for i in range (n ):
2054- p = self .Process (target = self ._new_wait , args = (cond , 0.001 ))
2055- workers .append (p )
2056- p .start ()
2057- time .sleep (DELTA * 2 )
2050+ for _ in range (n ):
2051+ self ._new_wait (cond , 0.0 )
20582052 # Sempahore.locked() is equivalent to
20592053 # Semaphore._semlock._is_zero()
20602054 self .assertTrue (cond ._sleeping_count .locked ())
20612055 self .assertTrue (cond ._woken_count .locked ())
20622056
2063- for i in range (n ):
2057+ workers = []
2058+ for _ in range (n ):
20642059 p = self .Process (target = self ._new_wait , args = (cond ,))
20652060 workers .append (p )
20662061 p .start ()
You can’t perform that action at this time.
0 commit comments