MCPcopy Create free account
hub / github.com/GH05TCREW/MetasploitMCP / mock_asyncio_to_thread

Function mock_asyncio_to_thread

conftest.py:113–119  ·  view source on GitHub ↗

Fixture to mock asyncio.to_thread for testing.

()

Source from the content-addressed store, hash-verified

111
112@pytest.fixture
113def 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
122def capture_logs(caplog):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected