MCPcopy
hub / github.com/MinishLab/semble / test_main_calls_asyncio_run

Function test_main_calls_asyncio_run

tests/test_cli.py:20–26  ·  view source on GitHub ↗

main() delegates to asyncio.run(serve(...)) when no CLI subcommand is given.

(argv: list[str], monkeypatch: pytest.MonkeyPatch)

Source from the content-addressed store, hash-verified

18 ],
19)
20def test_main_calls_asyncio_run(argv: list[str], monkeypatch: pytest.MonkeyPatch) -> None:
21 """main() delegates to asyncio.run(serve(...)) when no CLI subcommand is given."""
22 monkeypatch.setattr(sys, "argv", argv)
23 with patch("asyncio.run") as mock_run:
24 mock_run.side_effect = lambda coro: coro.close()
25 main()
26 mock_run.assert_called_once()
27
28
29@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

mainFunction · 0.90

Tested by

no test coverage detected