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_runner.py
testing/test_runner.py
53
setup
ref
function
ss.setup(item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
55
test_teardown_multiple_one_fails
def
function
def test_teardown_multiple_one_fails(self, pytester: Pytester) -> None: r = [] def fin1(): r.append("fin1") def fin2(): raise Exception("oops") def fin3(): r.append("fin3") item = pytester.getitem("def test_func(): pass") ss = i...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
58
fin1
def
function
def fin1(): r.append("fin1") def fin2(): raise Exception("oops") def fin3(): r.append("fin3") item = pytester.getitem("def test_func(): pass") ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin1, item) s...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
61
fin2
def
function
def fin2(): raise Exception("oops") def fin3(): r.append("fin3") item = pytester.getitem("def test_func(): pass") ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin1, item) ss.addfinalizer(fin2, item) ss.addfinalizer...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
64
fin3
def
function
def fin3(): r.append("fin3") item = pytester.getitem("def test_func(): pass") ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin1, item) ss.addfinalizer(fin2, item) ss.addfinalizer(fin3, item) with pytest.raises(Exception) as err...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
67
getitem
ref
function
item = pytester.getitem("def test_func(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
69
setup
ref
function
ss.setup(item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
70
addfinalizer
ref
function
ss.addfinalizer(fin1, item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
71
addfinalizer
ref
function
ss.addfinalizer(fin2, item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
72
addfinalizer
ref
function
ss.addfinalizer(fin3, item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
73
raises
ref
function
with pytest.raises(Exception) as err:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
74
teardown_exact
ref
function
ss.teardown_exact(None)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
78
test_teardown_multiple_fail
def
function
def test_teardown_multiple_fail(self, pytester: Pytester) -> None: # Ensure the first exception is the one which is re-raised. # Ideally both would be reported however. def fin1(): raise Exception("oops1") def fin2(): raise Exception("oops2") item = ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
81
fin1
def
function
def fin1(): r.append("fin1") def fin2(): raise Exception("oops") def fin3(): r.append("fin3") item = pytester.getitem("def test_func(): pass") ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin1, item) s...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
84
fin2
def
function
def fin2(): raise Exception("oops") def fin3(): r.append("fin3") item = pytester.getitem("def test_func(): pass") ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin1, item) ss.addfinalizer(fin2, item) ss.addfinalizer...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
87
getitem
ref
function
item = pytester.getitem("def test_func(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
89
setup
ref
function
ss.setup(item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
90
addfinalizer
ref
function
ss.addfinalizer(fin1, item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
91
addfinalizer
ref
function
ss.addfinalizer(fin2, item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
92
raises
ref
function
with pytest.raises(Exception) as err:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
93
teardown_exact
ref
function
ss.teardown_exact(None)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
96
test_teardown_multiple_scopes_one_fails
def
function
def test_teardown_multiple_scopes_one_fails(self, pytester: Pytester) -> None: module_teardown = [] def fin_func(): raise Exception("oops1") def fin_module(): module_teardown.append("fin_module") item = pytester.getitem("def test_func(): pass") mod ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
99
fin_func
def
function
def fin_func(): raise Exception("oops1") def fin_module(): module_teardown.append("fin_module") item = pytester.getitem("def test_func(): pass") mod = item.listchain()[-2] ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin_m...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
102
fin_module
def
function
def fin_module(): module_teardown.append("fin_module") item = pytester.getitem("def test_func(): pass") mod = item.listchain()[-2] ss = item.session._setupstate ss.setup(item) ss.addfinalizer(fin_module, mod) ss.addfinalizer(fin_func, item) wi...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
105
getitem
ref
function
item = pytester.getitem("def test_func(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
106
listchain
ref
function
mod = item.listchain()[-2]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
108
setup
ref
function
ss.setup(item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
109
addfinalizer
ref
function
ss.addfinalizer(fin_module, mod)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
110
addfinalizer
ref
function
ss.addfinalizer(fin_func, item)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
111
raises
ref
function
with pytest.raises(Exception, match="oops1"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
112
teardown_exact
ref
function
ss.teardown_exact(None)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
116
BaseFunctionalTests
def
class
test_passfunction test_failfunction test_skipfunction test_skip_in_setup_function test_failure_in_setup_function test_failure_in_teardown_function test_custom_failure_repr test_teardown_final_returncode test_logstart_logfinish_hooks test_exact_teardown_issue90 test_exact_teardown_issue1206 test_failure_in_setup_functio...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
117
test_passfunction
def
function
def test_passfunction(self, pytester: Pytester) -> None: reports = pytester.runitem( """ def test_func(): pass """ ) rep = reports[1] assert rep.passed assert not rep.failed assert rep.outcome == "passed" assert ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
118
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
130
test_failfunction
def
function
def test_failfunction(self, pytester: Pytester) -> None: reports = pytester.runitem( """ def test_func(): assert 0 """ ) rep = reports[1] assert not rep.passed assert not rep.skipped assert rep.failed assert rep....
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
131
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
145
test_skipfunction
def
function
def test_skipfunction(self, pytester: Pytester) -> None: reports = pytester.runitem( """ import pytest def test_func(): pytest.skip("hello") """ ) rep = reports[1] assert not rep.failed assert not rep.passed ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
146
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
165
test_skip_in_setup_function
def
function
def test_skip_in_setup_function(self, pytester: Pytester) -> None: reports = pytester.runitem( """ import pytest def setup_function(func): pytest.skip("hello") def test_func(): pass """ ) print(reports) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
166
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
186
test_failure_in_setup_function
def
function
def test_failure_in_setup_function(self, pytester: Pytester) -> None: reports = pytester.runitem( """ import pytest def setup_function(func): raise ValueError(42) def test_func(): pass """ ) rep = reports...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
187
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
203
test_failure_in_teardown_function
def
function
def test_failure_in_teardown_function(self, pytester: Pytester) -> None: reports = pytester.runitem( """ import pytest def teardown_function(func): raise ValueError(42) def test_func(): pass """ ) print(r...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
204
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
223
test_custom_failure_repr
def
function
def test_custom_failure_repr(self, pytester: Pytester) -> None: pytester.makepyfile( conftest=""" import pytest class Function(pytest.Function): def repr_failure(self, excinfo): return "hello" """ ) reports = pyt...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
224
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
232
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
248
test_teardown_final_returncode
def
function
def test_teardown_final_returncode(self, pytester: Pytester) -> None: rec = pytester.inline_runsource( """ def test_func(): pass def teardown_function(func): raise ValueError(42) """ ) assert rec.ret == 1 def te...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
249
inline_runsource
ref
function
rec = pytester.inline_runsource(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
259
test_logstart_logfinish_hooks
def
function
def test_logstart_logfinish_hooks(self, pytester: Pytester) -> None: rec = pytester.inline_runsource( """ import pytest def test_func(): pass """ ) reps = rec.getcalls("pytest_runtest_logstart pytest_runtest_logfinish") asse...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
260
inline_runsource
ref
function
rec = pytester.inline_runsource(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
267
getcalls
ref
function
reps = rec.getcalls("pytest_runtest_logstart pytest_runtest_logfinish")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
276
test_exact_teardown_issue90
def
function
def test_exact_teardown_issue90(self, pytester: Pytester) -> None: rec = pytester.inline_runsource( """ import pytest class TestClass(object): def test_method(self): pass def teardown_class(cls): rai...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
277
inline_runsource
ref
function
rec = pytester.inline_runsource(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
301
getreports
ref
function
reps = rec.getreports("pytest_runtest_logreport")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
316
test_exact_teardown_issue1206
def
function
def test_exact_teardown_issue1206(self, pytester: Pytester) -> None: """Issue shadowing error with wrong number of arguments on teardown_method.""" rec = pytester.inline_runsource( """ import pytest class TestClass(object): def teardown_method(sel...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
318
inline_runsource
ref
function
rec = pytester.inline_runsource(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
330
getreports
ref
function
reps = rec.getreports("pytest_runtest_logreport")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
354
test_failure_in_setup_function_ignores_custom_repr
def
function
def test_failure_in_setup_function_ignores_custom_repr( self, pytester: Pytester ) -> None: pytester.makepyfile( conftest=""" import pytest class Function(pytest.Function): def repr_failure(self, excinfo): assert 0 "...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
357
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
365
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
384
test_systemexit_does_not_bail_out
def
function
def test_systemexit_does_not_bail_out(self, pytester: Pytester) -> None: try: reports = pytester.runitem( """ def test_func(): raise SystemExit(42) """ ) except SystemExit: assert _False, "runner did ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
386
runitem
ref
function
reports = pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
398
test_exit_propagates
def
function
def test_exit_propagates(self, pytester: Pytester) -> None: try: pytester.runitem( """ import pytest def test_func(): raise pytest.exit.Exception() """ ) except pytest.exit.Exception: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
400
runitem
ref
function
pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
413
TestExecutionNonForked
def
class
getrunner test_keyboardinterrupt_propagates
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
414
getrunner
def
function
def getrunner(self): def f(item): return runner.runtestprotocol(item, log=_False) return f def test_keyboardinterrupt_propagates(self, pytester: Pytester) -> None: try: pytester.runitem( """ def test_func(): ra...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
415
f
def
function
def f(item): return runner.runtestprotocol(item, log=_False) return f def test_keyboardinterrupt_propagates(self, pytester: Pytester) -> None: try: pytester.runitem( """ def test_func(): raise KeyboardInterrupt("fa...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
416
runtestprotocol
ref
function
return runner.runtestprotocol(item, log=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
420
test_keyboardinterrupt_propagates
def
function
def test_keyboardinterrupt_propagates(self, pytester: Pytester) -> None: try: pytester.runitem( """ def test_func(): raise KeyboardInterrupt("fake") """ ) except KeyboardInterrupt: pass else: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
422
runitem
ref
function
pytester.runitem(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
434
TestSessionReports
def
class
test_collect_result
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
435
test_collect_result
def
function
def test_collect_result(self, pytester: Pytester) -> None: col = pytester.getmodulecol( """ def test_func1(): pass class TestClass(object): pass """ ) rep = runner.collect_one_node(col) assert not rep.failed ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
436
getmodulecol
ref
function
col = pytester.getmodulecol(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
444
collect_one_node
ref
function
rep = runner.collect_one_node(col)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
465
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
468
test_report_extra_parameters
def
function
def test_report_extra_parameters(reporttype: Type[reports.BaseReport]) -> None: args = list(inspect.signature(reporttype.__init__).parameters.keys())[1:] basekw: Dict[str, List[object]] = dict.fromkeys(args, []) report = reporttype(newthing=1, **basekw) assert report.newthing == 1
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
471
reporttype
ref
function
report = reporttype(newthing=1, **basekw)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
475
test_callinfo
def
function
def test_callinfo() -> None: ci = runner.CallInfo.from_call(lambda: 0, "collect") assert ci.when == "collect" assert ci.result == 0 assert "result" in repr(ci) assert repr(ci) == "<CallInfo when='collect' result: 0>" assert str(ci) == "<CallInfo when='collect' result: 0>" ci2 = runner.CallI...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
476
from_call
ref
function
ci = runner.CallInfo.from_call(lambda: 0, "collect")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
483
from_call
ref
function
ci2 = runner.CallInfo.from_call(lambda: 0 / 0, "collect")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
491
raise_assertion
def
function
def raise_assertion(): assert 0, "assert_msg" ci3 = runner.CallInfo.from_call(raise_assertion, "call") assert repr(ci3) == f"<CallInfo when='call' excinfo={ci3.excinfo!r}>" assert "\n" not in repr(ci3)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
494
from_call
ref
function
ci3 = runner.CallInfo.from_call(raise_assertion, "call")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
504
test_runtest_in_module_ordering
def
function
def test_runtest_in_module_ordering(pytester: Pytester) -> None: p1 = pytester.makepyfile( """ import pytest def pytest_runtest_setup(item): # runs after class-level! item.function.mylist.append("module") class TestClass(object): def pytest_runtest_setup(self,...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
505
makepyfile
ref
function
p1 = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
532
runpytest
ref
function
result = pytester.runpytest(p1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
533
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*2 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
536
test_outcomeexception_exceptionattributes
def
function
def test_outcomeexception_exceptionattributes() -> None: outcome = outcomes.OutcomeException("test") assert outcome.args[0] == outcome.msg
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
537
OutcomeException
ref
function
outcome = outcomes.OutcomeException("test")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
541
test_outcomeexception_passes_except_Exception
def
function
def test_outcomeexception_passes_except_Exception() -> None: with pytest.raises(outcomes.OutcomeException): try: raise outcomes.OutcomeException("test") except Exception as e: raise NotImplementedError from e
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
542
raises
ref
function
with pytest.raises(outcomes.OutcomeException):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
544
OutcomeException
ref
function
raise outcomes.OutcomeException("test")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
549
test_pytest_exit
def
function
def test_pytest_exit() -> None: with pytest.raises(pytest.exit.Exception) as excinfo: pytest.exit("hello") assert excinfo.errisinstance(pytest.exit.Exception)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
550
raises
ref
function
with pytest.raises(pytest.exit.Exception) as excinfo:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
552
errisinstance
ref
function
assert excinfo.errisinstance(pytest.exit.Exception)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
555
test_pytest_fail
def
function
def test_pytest_fail() -> None: with pytest.raises(pytest.fail.Exception) as excinfo: pytest.fail("hello") s = excinfo.exconly(tryshort=_True) assert s.startswith("Failed")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
556
raises
ref
function
with pytest.raises(pytest.fail.Exception) as excinfo:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
557
fail
ref
function
pytest.fail("hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
558
exconly
ref
function
s = excinfo.exconly(tryshort=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
562
test_pytest_exit_msg
def
function
def test_pytest_exit_msg(pytester: Pytester) -> None: pytester.makeconftest( """ import pytest def pytest_configure(config): pytest.exit('oh noes') """ ) result = pytester.runpytest() result.stderr.fnmatch_lines(["Exit: oh noes"])