Commit 7df72c1
committed
Fix test mock setup for async context managers
Use @contextlib.asynccontextmanager decorator instead of manual
__aenter__/__aexit__ implementation for mock_connect functions.
Fixes test failures in:
- test_transport_server_task_cleanup_on_exception
- test_transport_server_task_no_cleanup_on_terminated1 parent 550fe88 commit 7df72c1
1 file changed
+6
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
301 | 295 | | |
302 | 296 | | |
303 | 297 | | |
| |||
338 | 332 | | |
339 | 333 | | |
340 | 334 | | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
350 | 338 | | |
351 | 339 | | |
352 | 340 | | |
| |||
0 commit comments