@@ -87,7 +87,7 @@ def test_no_name_clash(self):
87
87
waitable_mock .timeout = "mytimeout"
88
88
waitable_mock ("works" )
89
89
waitable_mock .wait_until_called ()
90
- waitable_mock .wait_until_any_call ("works" )
90
+ waitable_mock .wait_until_any_call_with ("works" )
91
91
92
92
def test_wait_success (self ):
93
93
waitable_mock = self ._make_mock (spec = Something )
@@ -96,7 +96,7 @@ def test_wait_success(self):
96
96
something = Something ()
97
97
self .run_async (something .method_1 , delay = 0.01 )
98
98
something .method_1 .wait_until_called ()
99
- something .method_1 .wait_until_any_call ()
99
+ something .method_1 .wait_until_any_call_with ()
100
100
something .method_1 .assert_called ()
101
101
102
102
def test_wait_success_with_instance_timeout (self ):
@@ -106,7 +106,7 @@ def test_wait_success_with_instance_timeout(self):
106
106
something = Something ()
107
107
self .run_async (something .method_1 , delay = 0.01 )
108
108
something .method_1 .wait_until_called ()
109
- something .method_1 .wait_until_any_call ()
109
+ something .method_1 .wait_until_any_call_with ()
110
110
something .method_1 .assert_called ()
111
111
112
112
def test_wait_failed_with_instance_timeout (self ):
@@ -117,7 +117,7 @@ def test_wait_failed_with_instance_timeout(self):
117
117
self .run_async (something .method_1 , delay = 0.5 )
118
118
self .assertRaises (AssertionError , waitable_mock .method_1 .wait_until_called )
119
119
self .assertRaises (
120
- AssertionError , waitable_mock .method_1 .wait_until_any_call
120
+ AssertionError , waitable_mock .method_1 .wait_until_any_call_with
121
121
)
122
122
123
123
def test_wait_success_with_timeout_override (self ):
@@ -137,7 +137,7 @@ def test_wait_failed_with_timeout_override(self):
137
137
with self .assertRaises (AssertionError ):
138
138
something .method_1 .wait_until_called (timeout = 0.05 )
139
139
with self .assertRaises (AssertionError ):
140
- something .method_1 .wait_until_any_call (timeout = 0.05 )
140
+ something .method_1 .wait_until_any_call_with (timeout = 0.05 )
141
141
142
142
def test_wait_success_called_before (self ):
143
143
waitable_mock = self ._make_mock ()
@@ -146,7 +146,7 @@ def test_wait_success_called_before(self):
146
146
something = Something ()
147
147
something .method_1 ()
148
148
something .method_1 .wait_until_called ()
149
- something .method_1 .wait_until_any_call ()
149
+ something .method_1 .wait_until_any_call_with ()
150
150
something .method_1 .assert_called ()
151
151
152
152
def test_wait_magic_method (self ):
@@ -158,7 +158,7 @@ def test_wait_magic_method(self):
158
158
something .method_1 .__str__ .wait_until_called ()
159
159
something .method_1 .__str__ .assert_called ()
160
160
161
- def test_wait_until_any_call_positional (self ):
161
+ def test_wait_until_any_call_with_positional (self ):
162
162
waitable_mock = self ._make_mock (spec = Something )
163
163
164
164
with patch (f"{ __name__ } .Something" , waitable_mock ):
@@ -168,16 +168,16 @@ def test_wait_until_any_call_positional(self):
168
168
self .run_async (something .method_1 , 3 , delay = 0.3 )
169
169
self .assertNotIn (call (1 ), something .method_1 .mock_calls )
170
170
171
- something .method_1 .wait_until_any_call (1 )
171
+ something .method_1 .wait_until_any_call_with (1 )
172
172
something .method_1 .assert_called_with (1 )
173
173
self .assertNotIn (call (2 ), something .method_1 .mock_calls )
174
174
self .assertNotIn (call (3 ), something .method_1 .mock_calls )
175
175
176
- something .method_1 .wait_until_any_call (3 )
176
+ something .method_1 .wait_until_any_call_with (3 )
177
177
self .assertIn (call (2 ), something .method_1 .mock_calls )
178
- something .method_1 .wait_until_any_call (2 )
178
+ something .method_1 .wait_until_any_call_with (2 )
179
179
180
- def test_wait_until_any_call_keywords (self ):
180
+ def test_wait_until_any_call_with_keywords (self ):
181
181
waitable_mock = self ._make_mock (spec = Something )
182
182
183
183
with patch (f"{ __name__ } .Something" , waitable_mock ):
@@ -187,16 +187,16 @@ def test_wait_until_any_call_keywords(self):
187
187
self .run_async (something .method_1 , c = 3 , delay = 0.3 )
188
188
self .assertNotIn (call (a = 1 ), something .method_1 .mock_calls )
189
189
190
- something .method_1 .wait_until_any_call (a = 1 )
190
+ something .method_1 .wait_until_any_call_with (a = 1 )
191
191
something .method_1 .assert_called_with (a = 1 )
192
192
self .assertNotIn (call (b = 2 ), something .method_1 .mock_calls )
193
193
self .assertNotIn (call (c = 3 ), something .method_1 .mock_calls )
194
194
195
- something .method_1 .wait_until_any_call (c = 3 )
195
+ something .method_1 .wait_until_any_call_with (c = 3 )
196
196
self .assertIn (call (b = 2 ), something .method_1 .mock_calls )
197
- something .method_1 .wait_until_any_call (b = 2 )
197
+ something .method_1 .wait_until_any_call_with (b = 2 )
198
198
199
- def test_wait_until_any_call_no_argument_fails_when_called_with_arg (self ):
199
+ def test_wait_until_any_call_with_no_argument_fails_when_called_with_arg (self ):
200
200
waitable_mock = self ._make_mock (timeout = 0.01 )
201
201
202
202
with patch (f"{ __name__ } .Something" , waitable_mock ):
@@ -205,25 +205,25 @@ def test_wait_until_any_call_no_argument_fails_when_called_with_arg(self):
205
205
206
206
something .method_1 .assert_called_with (1 )
207
207
with self .assertRaises (AssertionError ):
208
- something .method_1 .wait_until_any_call ()
208
+ something .method_1 .wait_until_any_call_with ()
209
209
210
210
something .method_1 ()
211
- something .method_1 .wait_until_any_call ()
211
+ something .method_1 .wait_until_any_call_with ()
212
212
213
- def test_wait_until_any_call_global_default (self ):
213
+ def test_wait_until_any_call_with_global_default (self ):
214
214
with patch .object (ThreadingMock , "DEFAULT_TIMEOUT" ):
215
215
ThreadingMock .DEFAULT_TIMEOUT = 0.01
216
216
m = self ._make_mock ()
217
217
with self .assertRaises (AssertionError ):
218
- m .wait_until_any_call ()
218
+ m .wait_until_any_call_with ()
219
219
with self .assertRaises (AssertionError ):
220
220
m .wait_until_called ()
221
221
222
222
m ()
223
- m .wait_until_any_call ()
223
+ m .wait_until_any_call_with ()
224
224
assert ThreadingMock .DEFAULT_TIMEOUT != 0.01
225
225
226
- def test_wait_until_any_call_change_global_and_override (self ):
226
+ def test_wait_until_any_call_with_change_global_and_override (self ):
227
227
with patch .object (ThreadingMock , "DEFAULT_TIMEOUT" ):
228
228
ThreadingMock .DEFAULT_TIMEOUT = 0.01
229
229
@@ -256,21 +256,21 @@ def test_reset_mock_resets_wait(self):
256
256
with self .assertRaises (AssertionError ):
257
257
m .wait_until_called ()
258
258
with self .assertRaises (AssertionError ):
259
- m .wait_until_any_call ()
259
+ m .wait_until_any_call_with ()
260
260
m ()
261
261
m .wait_until_called ()
262
- m .wait_until_any_call ()
262
+ m .wait_until_any_call_with ()
263
263
m .assert_called_once ()
264
264
265
265
m .reset_mock ()
266
266
267
267
with self .assertRaises (AssertionError ):
268
268
m .wait_until_called ()
269
269
with self .assertRaises (AssertionError ):
270
- m .wait_until_any_call ()
270
+ m .wait_until_any_call_with ()
271
271
m ()
272
272
m .wait_until_called ()
273
- m .wait_until_any_call ()
273
+ m .wait_until_any_call_with ()
274
274
m .assert_called_once ()
275
275
276
276
0 commit comments