MCPcopy
hub / github.com/sanic-org/sanic / test_command_with_args

Function test_command_with_args

tests/test_cli.py:382–393  ·  view source on GitHub ↗
(caplog)

Source from the content-addressed store, hash-verified

380
381
382def test_command_with_args(caplog):
383 args = [
384 "fake.server.app",
385 "exec",
386 "foo",
387 "--one=1",
388 "--two=2",
389 "--three=3",
390 ]
391 with patch("sys.argv", ["sanic", *args]):
392 lines = capture(args, caplog)
393 assert "FOO one='1' two='2' three='3'" in lines
394
395
396def test_command_with_sync_handler(caplog):

Callers

nothing calls this directly

Calls 2

patchFunction · 0.85
captureFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…