File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Lib/test/test_unittest/testmock Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -198,23 +198,23 @@ def test_reset_mock_resets_wait(self):
198198 m .assert_called_once ()
199199
200200 def test_call_count_thread_safe (self ):
201-
201+
202202 m = ThreadingMock ()
203-
203+
204204 # 3k loops reliably reproduces the issue while keeping runtime ~0.6s
205205 LOOPS = 3_000
206206 THREADS = 10
207-
207+
208208 def test_function ():
209209 for _ in range (LOOPS ):
210210 m ()
211-
211+
212212 threads = [threading .Thread (target = test_function ) for _ in range (THREADS )]
213213 for thread in threads :
214214 thread .start ()
215215 for thread in threads :
216216 thread .join ()
217-
217+
218218 self .assertEqual (m .call_count , LOOPS * THREADS ,
219219 f"Expected { LOOPS * THREADS } , got { m .call_count } " )
220220
You can’t perform that action at this time.
0 commit comments