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

Function test_make_parser

test/mitmproxy/test_optmanager.py:400–413  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

398
399
400def test_make_parser():
401 parser = argparse.ArgumentParser()
402 opts = TTypes()
403 opts.make_parser(parser, "str", short="a")
404 opts.make_parser(parser, "bool", short="b")
405 opts.make_parser(parser, "int", short="c")
406 opts.make_parser(parser, "seqstr", short="d")
407 opts.make_parser(parser, "bool_on", short="e")
408
409 with pytest.raises(ValueError):
410 opts.make_parser(parser, "unknown")
411
412 # Nonexistent options ignore
413 opts.make_parser(parser, "nonexistentxxx")
414
415
416def test_set():

Callers

nothing calls this directly

Calls 2

TTypesClass · 0.85
make_parserMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…