Skip to content

Commit e7dcc57

Browse files
committed
add @requires_resource('cpu')
1 parent 8e2348c commit e7dcc57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_unittest/testmock/testthreadingmock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import threading
44
import concurrent.futures
55

6-
from test.support import threading_helper
6+
from test.support import requires_resource, threading_helper
77
from unittest.mock import patch, ThreadingMock
88

99

@@ -197,6 +197,7 @@ def test_reset_mock_resets_wait(self):
197197
m.wait_until_any_call_with()
198198
m.assert_called_once()
199199

200+
@requires_resource('cpu')
200201
def test_call_count_thread_safe(self):
201202
m = ThreadingMock()
202203
# 3k loops reliably reproduces the issue while keeping runtime ~0.6s

0 commit comments

Comments
 (0)