MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_parsearg

Function test_parsearg

test/mitmproxy/test_command.py:611–618  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

609
610
611def test_parsearg():
612 with taddons.context() as tctx:
613 tctx.master.addons.add(DummyConsole())
614 assert command.parsearg(tctx.master.commands, "foo", str) == "foo"
615 with pytest.raises(exceptions.CommandError, match="Unsupported"):
616 command.parsearg(tctx.master.commands, "foo", type)
617 with pytest.raises(exceptions.CommandError):
618 command.parsearg(tctx.master.commands, "foo", int)
619
620
621class TDec:

Callers

nothing calls this directly

Calls 3

contextMethod · 0.80
DummyConsoleClass · 0.70
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…