fname stringlengths 63 176 | rel_fname stringclasses 706
values | line int64 -1 4.5k | name stringlengths 1 81 | kind stringclasses 2
values | category stringclasses 2
values | info stringlengths 0 77.9k ⌀ |
|---|---|---|---|---|---|---|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 55 | warns | ref | function | with pytest.warns(DeprecationWarning):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 56 | raises | ref | function | with pytest.raises(KeyError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 57 | Argument | ref | function | argument = parseopt.Argument("-t", dest="abc", type="choice")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 58 | Argument | ref | function | argument = parseopt.Argument(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 63 | test_argument_processopt | def | function | def test_argument_processopt(self) -> None:
argument = parseopt.Argument("-t", type=int)
argument.default = 42
argument.dest = "abc"
res = argument.attrs()
assert res["default"] == 42
assert res["dest"] == "abc"
def test_group_add_and_get(self, parser: parseopt.P... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 64 | Argument | ref | function | argument = parseopt.Argument("-t", type=int)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 67 | attrs | ref | function | res = argument.attrs()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 71 | test_group_add_and_get | def | function | def test_group_add_and_get(self, parser: parseopt.Parser) -> None:
group = parser.getgroup("hello", description="desc")
assert group.name == "hello"
assert group.description == "desc"
def test_getgroup_simple(self, parser: parseopt.Parser) -> None:
group = parser.getgroup("hello... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 72 | getgroup | ref | function | group = parser.getgroup("hello", description="desc")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 76 | test_getgroup_simple | def | function | def test_getgroup_simple(self, parser: parseopt.Parser) -> None:
group = parser.getgroup("hello", description="desc")
assert group.name == "hello"
assert group.description == "desc"
group2 = parser.getgroup("hello")
assert group2 is group
def test_group_ordering(self, pa... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 77 | getgroup | ref | function | group = parser.getgroup("hello", description="desc")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 80 | getgroup | ref | function | group2 = parser.getgroup("hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 83 | test_group_ordering | def | function | def test_group_ordering(self, parser: parseopt.Parser) -> None:
parser.getgroup("1")
parser.getgroup("2")
parser.getgroup("3", after="1")
groups = parser._groups
groups_names = [x.name for x in groups]
assert groups_names == list("132")
def test_group_addoption(s... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 84 | getgroup | ref | function | parser.getgroup("1")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 85 | getgroup | ref | function | parser.getgroup("2")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 86 | getgroup | ref | function | parser.getgroup("3", after="1")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 91 | test_group_addoption | def | function | def test_group_addoption(self) -> None:
group = parseopt.OptionGroup("hello", _ispytest=_True)
group.addoption("--option1", action="store_true")
assert len(group.options) == 1
assert isinstance(group.options[0], parseopt.Argument)
def test_group_addoption_conflict(self) -> None:... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 92 | OptionGroup | ref | function | group = parseopt.OptionGroup("hello", _ispytest=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 93 | addoption | ref | function | group.addoption("--option1", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 97 | test_group_addoption_conflict | def | function | def test_group_addoption_conflict(self) -> None:
group = parseopt.OptionGroup("hello again", _ispytest=_True)
group.addoption("--option1", "--option-1", action="store_true")
with pytest.raises(ValueError) as err:
group.addoption("--option1", "--option-one", action="store_true")
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 98 | OptionGroup | ref | function | group = parseopt.OptionGroup("hello again", _ispytest=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 99 | addoption | ref | function | group.addoption("--option1", "--option-1", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 100 | raises | ref | function | with pytest.raises(ValueError) as err:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 101 | addoption | ref | function | group.addoption("--option1", "--option-one", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 104 | test_group_shortopt_lowercase | def | function | def test_group_shortopt_lowercase(self, parser: parseopt.Parser) -> None:
group = parser.getgroup("hello")
with pytest.raises(ValueError):
group.addoption("-x", action="store_true")
assert len(group.options) == 0
group._addoption("-x", action="store_true")
assert ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 105 | getgroup | ref | function | group = parser.getgroup("hello")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 106 | raises | ref | function | with pytest.raises(ValueError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 107 | addoption | ref | function | group.addoption("-x", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 109 | _addoption | ref | function | group._addoption("-x", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 112 | test_parser_addoption | def | function | def test_parser_addoption(self, parser: parseopt.Parser) -> None:
group = parser.getgroup("custom options")
assert len(group.options) == 0
group.addoption("--option1", action="store_true")
assert len(group.options) == 1
def test_parse(self, parser: parseopt.Parser) -> None:
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 113 | getgroup | ref | function | group = parser.getgroup("custom options")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 115 | addoption | ref | function | group.addoption("--option1", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 118 | test_parse | def | function | def test_parse(self, parser: parseopt.Parser) -> None:
parser.addoption("--hello", dest="hello", action="store")
args = parser.parse(["--hello", "world"])
assert args.hello == "world"
assert not getattr(args, parseopt.FILE_OR_DIR)
def test_parse2(self, parser: parseopt.Parser) -... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 119 | addoption | ref | function | parser.addoption("--hello", dest="hello", action="store")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 120 | parse | ref | function | args = parser.parse(["--hello", "world"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 124 | test_parse2 | def | function | def test_parse2(self, parser: parseopt.Parser) -> None:
args = parser.parse([Path(".")])
assert getattr(args, parseopt.FILE_OR_DIR)[0] == "."
def test_parse_known_args(self, parser: parseopt.Parser) -> None:
parser.parse_known_args([Path(".")])
parser.addoption("--hello", action... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 125 | parse | ref | function | args = parser.parse([Path(".")])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 128 | test_parse_known_args | def | function | def test_parse_known_args(self, parser: parseopt.Parser) -> None:
parser.parse_known_args([Path(".")])
parser.addoption("--hello", action="store_true")
ns = parser.parse_known_args(["x", "--y", "--hello", "this"])
assert ns.hello
assert ns.file_or_dir == ["x"]
def test_p... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 129 | parse_known_args | ref | function | parser.parse_known_args([Path(".")])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 130 | addoption | ref | function | parser.addoption("--hello", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 131 | parse_known_args | ref | function | ns = parser.parse_known_args(["x", "--y", "--hello", "this"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 135 | test_parse_known_and_unknown_args | def | function | def test_parse_known_and_unknown_args(self, parser: parseopt.Parser) -> None:
parser.addoption("--hello", action="store_true")
ns, unknown = parser.parse_known_and_unknown_args(
["x", "--y", "--hello", "this"]
)
assert ns.hello
assert ns.file_or_dir == ["x"]
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 136 | addoption | ref | function | parser.addoption("--hello", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 137 | parse_known_and_unknown_args | ref | function | ns, unknown = parser.parse_known_and_unknown_args(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 144 | test_parse_will_set_default | def | function | def test_parse_will_set_default(self, parser: parseopt.Parser) -> None:
parser.addoption("--hello", dest="hello", default="x", action="store")
option = parser.parse([])
assert option.hello == "x"
del option.hello
parser.parse_setoption([], option)
assert option.hello ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 145 | addoption | ref | function | parser.addoption("--hello", dest="hello", default="x", action="store")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 146 | parse | ref | function | option = parser.parse([])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 149 | parse_setoption | ref | function | parser.parse_setoption([], option)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 152 | test_parse_setoption | def | function | def test_parse_setoption(self, parser: parseopt.Parser) -> None:
parser.addoption("--hello", dest="hello", action="store")
parser.addoption("--world", dest="world", default=42)
option = argparse.Namespace()
args = parser.parse_setoption(["--hello", "world"], option)
assert o... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 153 | addoption | ref | function | parser.addoption("--hello", dest="hello", action="store")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 154 | addoption | ref | function | parser.addoption("--world", dest="world", default=42)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 157 | parse_setoption | ref | function | args = parser.parse_setoption(["--hello", "world"], option)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 162 | test_parse_special_destination | def | function | def test_parse_special_destination(self, parser: parseopt.Parser) -> None:
parser.addoption("--ultimate-answer", type=int)
args = parser.parse(["--ultimate-answer", "42"])
assert args.ultimate_answer == 42
def test_parse_split_positional_arguments(self, parser: parseopt.Parser) -> None:... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 163 | addoption | ref | function | parser.addoption("--ultimate-answer", type=int)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 164 | parse | ref | function | args = parser.parse(["--ultimate-answer", "42"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 167 | test_parse_split_positional_arguments | def | function | def test_parse_split_positional_arguments(self, parser: parseopt.Parser) -> None:
parser.addoption("-R", action="store_true")
parser.addoption("-S", action="store_false")
args = parser.parse(["-R", "4", "2", "-S"])
assert getattr(args, parseopt.FILE_OR_DIR) == ["4", "2"]
args... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 168 | addoption | ref | function | parser.addoption("-R", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 169 | addoption | ref | function | parser.addoption("-S", action="store_false")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 170 | parse | ref | function | args = parser.parse(["-R", "4", "2", "-S"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 172 | parse | ref | function | args = parser.parse(["-R", "-S", "4", "2", "-R"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 176 | parse | ref | function | args = parser.parse(["-R", "4", "-S", "2"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 181 | test_parse_defaultgetter | def | function | def test_parse_defaultgetter(self) -> None:
def defaultget(option):
if not hasattr(option, "type"):
return
if option.type is int:
option.default = 42
elif option.type is str:
option.default = "world"
parser = parseo... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 182 | defaultget | def | function | def defaultget(option):
if not hasattr(option, "type"):
return
if option.type is int:
option.default = 42
elif option.type is str:
option.default = "world"
parser = parseopt.Parser(processopt=defaultget, _ispytest=_True... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 190 | Parser | ref | function | parser = parseopt.Parser(processopt=defaultget, _ispytest=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 191 | addoption | ref | function | parser.addoption("--this", dest="this", type=int, action="store")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 192 | addoption | ref | function | parser.addoption("--hello", dest="hello", type=str, action="store")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 193 | addoption | ref | function | parser.addoption("--no", dest="no", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 194 | parse | ref | function | option = parser.parse([])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 199 | test_drop_short_helper | def | function | def test_drop_short_helper(self) -> None:
parser = argparse.ArgumentParser(
formatter_class=parseopt.DropShorterLongHelpFormatter, allow_abbrev=_False
)
parser.add_argument(
"-t", "--twoword", "--duo", "--two-word", "--two", help="foo"
)
# throws error... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 203 | add_argument | ref | function | parser.add_argument(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 207 | add_argument | ref | function | parser.add_argument(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 210 | add_argument | ref | function | parser.add_argument("-s", action="store_true", help="single short")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 211 | add_argument | ref | function | parser.add_argument("--abc", "-a", action="store_true", help="bar")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 212 | add_argument | ref | function | parser.add_argument("--klm", "-k", "--kl-m", action="store_true", help="bar")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 213 | add_argument | ref | function | parser.add_argument(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 216 | add_argument | ref | function | parser.add_argument(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 219 | add_argument | ref | function | parser.add_argument(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 222 | add_argument | ref | function | parser.add_argument("files_and_dirs", nargs="*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 223 | parse_args | ref | function | args = parser.parse_args(["-k", "--duo", "hallo", "--exitfirst"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 229 | parse_args | ref | function | args = parser.parse_args(["--deux-mots"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 230 | raises | ref | function | with pytest.raises(AttributeError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 233 | parse_args | ref | function | args = parser.parse_args(["file", "dir"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 236 | test_drop_short_0 | def | function | def test_drop_short_0(self, parser: parseopt.Parser) -> None:
parser.addoption("--funcarg", "--func-arg", action="store_true")
parser.addoption("--abc-def", "--abc-def", action="store_true")
parser.addoption("--klm-hij", action="store_true")
with pytest.raises(UsageError):
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 237 | addoption | ref | function | parser.addoption("--funcarg", "--func-arg", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 238 | addoption | ref | function | parser.addoption("--abc-def", "--abc-def", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 239 | addoption | ref | function | parser.addoption("--klm-hij", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 240 | raises | ref | function | with pytest.raises(UsageError):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 241 | parse | ref | function | parser.parse(["--funcarg", "--k"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 243 | test_drop_short_2 | def | function | def test_drop_short_2(self, parser: parseopt.Parser) -> None:
parser.addoption("--func-arg", "--doit", action="store_true")
args = parser.parse(["--doit"])
assert args.func_arg is _True
def test_drop_short_3(self, parser: parseopt.Parser) -> None:
parser.addoption("--func-arg", ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 244 | addoption | ref | function | parser.addoption("--func-arg", "--doit", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 245 | parse | ref | function | args = parser.parse(["--doit"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 248 | test_drop_short_3 | def | function | def test_drop_short_3(self, parser: parseopt.Parser) -> None:
parser.addoption("--func-arg", "--funcarg", "--doit", action="store_true")
args = parser.parse(["abcd"])
assert args.func_arg is _False
assert args.file_or_dir == ["abcd"]
def test_drop_short_help0(self, parser: parse... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 249 | addoption | ref | function | parser.addoption("--func-arg", "--funcarg", "--doit", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 250 | parse | ref | function | args = parser.parse(["abcd"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 254 | test_drop_short_help0 | def | function | def test_drop_short_help0(self, parser: parseopt.Parser) -> None:
parser.addoption("--func-args", "--doit", help="foo", action="store_true")
parser.parse([])
help = parser.optparser.format_help()
assert "--func-args, --doit foo" in help
# testing would be more helpful with all ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 255 | addoption | ref | function | parser.addoption("--func-args", "--doit", help="foo", action="store_true")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 256 | parse | ref | function | parser.parse([])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 257 | format_help | ref | function | help = parser.optparser.format_help()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 261 | test_drop_short_help1 | def | function | def test_drop_short_help1(self, parser: parseopt.Parser) -> None:
group = parser.getgroup("general")
group.addoption("--doit", "--func-args", action="store_true", help="foo")
group._addoption(
"-h",
"--help",
action="store_true",
dest="help",
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_parseopt.py | testing/test_parseopt.py | 262 | getgroup | ref | function | group = parser.getgroup("general")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.