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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
312
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
333
runpytest
ref
function
reprec = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
334
assert_outcomes
ref
function
reprec.assert_outcomes(passed=1, skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
337
test_SkipTest_during_collection
def
function
def test_SkipTest_during_collection(pytester: Pytester) -> None: p = pytester.makepyfile( """ import nose raise nose.SkipTest("during collection") def test_failing(): assert _False """ ) result = pytester.runpytest(p) result.assert_outcomes(skipped=1, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
338
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
346
runpytest
ref
function
result = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
347
assert_outcomes
ref
function
result.assert_outcomes(skipped=1, warnings=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
350
test_SkipTest_in_test
def
function
def test_SkipTest_in_test(pytester: Pytester) -> None: pytester.makepyfile( """ import nose def test_skipping(): raise nose.SkipTest("in test") """ ) reprec = pytester.inline_run() reprec.assertoutcome(skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
351
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
359
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
360
assertoutcome
ref
function
reprec.assertoutcome(skipped=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
363
test_istest_function_decorator
def
function
def test_istest_function_decorator(pytester: Pytester) -> None: p = pytester.makepyfile( """ import nose.tools @nose.tools.istest def not_test_prefix(): pass """ ) result = pytester.runpytest(p) result.assert_outcomes(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
364
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
372
runpytest
ref
function
result = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
373
assert_outcomes
ref
function
result.assert_outcomes(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
376
test_nottest_function_decorator
def
function
def test_nottest_function_decorator(pytester: Pytester) -> None: pytester.makepyfile( """ import nose.tools @nose.tools.nottest def test_prefix(): pass """ ) reprec = pytester.inline_run() assert not reprec.getfailedcollections() calls = reprec.get...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
377
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
385
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
386
getfailedcollections
ref
function
assert not reprec.getfailedcollections()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
387
getreports
ref
function
calls = reprec.getreports("pytest_runtest_logreport")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
391
test_istest_class_decorator
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
392
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
401
runpytest
ref
function
result = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
402
assert_outcomes
ref
function
result.assert_outcomes(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
405
test_nottest_class_decorator
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
406
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
415
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
416
getfailedcollections
ref
function
assert not reprec.getfailedcollections()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
417
getreports
ref
function
calls = reprec.getreports("pytest_runtest_logreport")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
421
test_skip_test_with_unicode
def
function
def test_skip_test_with_unicode(pytester: Pytester) -> None: pytester.makepyfile( """\ import unittest class TestClass(): def test_io(self): raise unittest.SkipTest('😊') """ ) result = pytester.runpytest() result.stdout.fnmatch_lines(["* 1 ski...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
422
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
430
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
431
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["* 1 skipped *"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
434
test_raises
def
function
def test_raises(pytester: Pytester) -> None: pytester.makepyfile( """ from nose.tools import raises @raises(RuntimeError) def test_raises_runtimeerror(): raise RuntimeError @raises(Exception) def test_raises_baseexception_not_caught(): raise ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
435
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
452
runpytest
ref
function
result = pytester.runpytest("-vv")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_nose.py
testing/test_nose.py
453
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
15
parser
def
function
def parser() -> parseopt.Parser: return parseopt.Parser(_ispytest=_True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
16
Parser
ref
function
return parseopt.Parser(_ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
19
TestParser
def
class
test_no_help_by_default test_custom_prog test_argument test_argument_type test_argument_processopt test_group_add_and_get test_getgroup_simple test_group_ordering test_group_addoption test_group_addoption_conflict test_group_shortopt_lowercase test_parser_addoption test_parse test_parse2 test_parse_known_args test_pars...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
20
test_no_help_by_default
def
function
def test_no_help_by_default(self) -> None: parser = parseopt.Parser(usage="xyz", _ispytest=_True) pytest.raises(UsageError, lambda: parser.parse(["-h"])) def test_custom_prog(self, parser: parseopt.Parser) -> None: """Custom prog can be set for `argparse.ArgumentParser`.""" asse...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
21
Parser
ref
function
parser = parseopt.Parser(usage="xyz", _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
22
raises
ref
function
pytest.raises(UsageError, lambda: parser.parse(["-h"]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
22
parse
ref
function
pytest.raises(UsageError, lambda: parser.parse(["-h"]))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
24
test_custom_prog
def
function
def test_custom_prog(self, parser: parseopt.Parser) -> None: """Custom prog can be set for `argparse.ArgumentParser`.""" assert parser._getparser().prog == os.path.basename(sys.argv[0]) parser.prog = "custom-prog" assert parser._getparser().prog == "custom-prog" def test_argumen...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
26
_getparser
ref
function
assert parser._getparser().prog == os.path.basename(sys.argv[0])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
26
basename
ref
function
assert parser._getparser().prog == os.path.basename(sys.argv[0])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
28
_getparser
ref
function
assert parser._getparser().prog == "custom-prog"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
30
test_argument
def
function
def test_argument(self) -> None: with pytest.raises(parseopt.ArgumentError): # need a short or long option argument = parseopt.Argument() argument = parseopt.Argument("-t") assert argument._short_opts == ["-t"] assert argument._long_opts == [] assert a...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
31
raises
ref
function
with pytest.raises(parseopt.ArgumentError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
33
Argument
ref
function
argument = parseopt.Argument()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
34
Argument
ref
function
argument = parseopt.Argument("-t")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
38
Argument
ref
function
argument = parseopt.Argument("-t", "--test")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
42
Argument
ref
function
argument = parseopt.Argument("-t", "--test", dest="abc")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
48
test_argument_type
def
function
def test_argument_type(self) -> None: argument = parseopt.Argument("-t", dest="abc", type=int) assert argument.type is int argument = parseopt.Argument("-t", dest="abc", type=str) assert argument.type is str argument = parseopt.Argument("-t", dest="abc", type=float) a...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
49
Argument
ref
function
argument = parseopt.Argument("-t", dest="abc", type=int)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
51
Argument
ref
function
argument = parseopt.Argument("-t", dest="abc", type=str)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
53
Argument
ref
function
argument = parseopt.Argument("-t", dest="abc", type=float)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
55
warns
ref
function
with pytest.warns(DeprecationWarning):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
56
raises
ref
function
with pytest.raises(KeyError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
57
Argument
ref
function
argument = parseopt.Argument("-t", dest="abc", type="choice")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
58
Argument
ref
function
argument = parseopt.Argument(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
64
Argument
ref
function
argument = parseopt.Argument("-t", type=int)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
67
attrs
ref
function
res = argument.attrs()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
72
getgroup
ref
function
group = parser.getgroup("hello", description="desc")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
77
getgroup
ref
function
group = parser.getgroup("hello", description="desc")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
80
getgroup
ref
function
group2 = parser.getgroup("hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
84
getgroup
ref
function
parser.getgroup("1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
85
getgroup
ref
function
parser.getgroup("2")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
86
getgroup
ref
function
parser.getgroup("3", after="1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
92
OptionGroup
ref
function
group = parseopt.OptionGroup("hello", _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
93
addoption
ref
function
group.addoption("--option1", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
98
OptionGroup
ref
function
group = parseopt.OptionGroup("hello again", _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
99
addoption
ref
function
group.addoption("--option1", "--option-1", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
100
raises
ref
function
with pytest.raises(ValueError) as err:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
101
addoption
ref
function
group.addoption("--option1", "--option-one", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
105
getgroup
ref
function
group = parser.getgroup("hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
106
raises
ref
function
with pytest.raises(ValueError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
107
addoption
ref
function
group.addoption("-x", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
109
_addoption
ref
function
group._addoption("-x", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
113
getgroup
ref
function
group = parser.getgroup("custom options")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
115
addoption
ref
function
group.addoption("--option1", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
119
addoption
ref
function
parser.addoption("--hello", dest="hello", action="store")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
120
parse
ref
function
args = parser.parse(["--hello", "world"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
125
parse
ref
function
args = parser.parse([Path(".")])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
129
parse_known_args
ref
function
parser.parse_known_args([Path(".")])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_parseopt.py
testing/test_parseopt.py
130
addoption
ref
function
parser.addoption("--hello", action="store_true")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/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"] ...