Fixture to mock asyncio.to_thread for testing.
()
| 111 | |
| 112 | @pytest.fixture |
| 113 | def mock_asyncio_to_thread(): |
| 114 | """Fixture to mock asyncio.to_thread for testing.""" |
| 115 | async def mock_to_thread(func, *args, **kwargs): |
| 116 | return func(*args, **kwargs) |
| 117 | |
| 118 | with patch('asyncio.to_thread', side_effect=mock_to_thread): |
| 119 | yield |
| 120 | |
| 121 | @pytest.fixture |
| 122 | def capture_logs(caplog): |
nothing calls this directly
no outgoing calls
no test coverage detected