MCPcopy
hub / github.com/pallets/click / test_parser_collects_prefixes

Function test_parser_collects_prefixes

tests/test_parser.py:27–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25
26
27def test_parser_collects_prefixes():
28 ctx = click.Context(click.Command("test"))
29 parser = _OptionParser(ctx)
30 click.Option("+p", is_flag=True).add_to_parser(parser, ctx)
31 click.Option("!e", is_flag=True).add_to_parser(parser, ctx)
32 assert parser._opt_prefixes == {"-", "--", "+", "!"}

Callers

nothing calls this directly

Calls 2

_OptionParserClass · 0.90
add_to_parserMethod · 0.45

Tested by

no test coverage detected