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
563
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
571
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
572
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(["Exit: oh noes"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
575
_strip_resource_warnings
def
function
def _strip_resource_warnings(lines): # Assert no output on stderr, except for unreliable ResourceWarnings. # (https://github.com/pytest-dev/pytest/issues/5088) return [ x for x in lines if not x.startswith(("Exception ignored in:", "ResourceWarning")) ]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
585
test_pytest_exit_returncode
def
function
def test_pytest_exit_returncode(pytester: Pytester) -> None: pytester.makepyfile( """\ import pytest def test_foo(): pytest.exit("some exit msg", 99) """ ) result = pytester.runpytest() result.stdout.fnmatch_lines(["*! *Exit: some exit msg !*"]) assert _strip...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
586
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
593
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
594
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*! *Exit: some exit msg !*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
596
_strip_resource_warnings
ref
function
assert _strip_resource_warnings(result.stderr.lines) == []
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
600
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
608
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
609
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*! *Exit: during_sessionstart !*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
610
_strip_resource_warnings
ref
function
assert _strip_resource_warnings(result.stderr.lines) == [
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
616
test_pytest_fail_notrace_runtest
def
function
def test_pytest_fail_notrace_runtest(pytester: Pytester) -> None: """Test pytest.fail(..., pytrace=_False) does not show tracebacks during test run.""" pytester.makepyfile( """ import pytest def test_hello(): pytest.fail("hello", pytrace=_False) def teardown_function(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
618
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
627
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
628
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["world", "hello"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
629
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*def teardown_function*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
632
test_pytest_fail_notrace_collection
def
function
def test_pytest_fail_notrace_collection(pytester: Pytester) -> None: """Test pytest.fail(..., pytrace=_False) does not show tracebacks during collection.""" pytester.makepyfile( """ import pytest def some_internal_function(): pytest.fail("hello", pytrace=_False) some_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
634
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
642
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
643
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["hello"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
644
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*def some_internal_function()*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
647
test_pytest_fail_notrace_non_ascii
def
function
def test_pytest_fail_notrace_non_ascii(pytester: Pytester) -> None: """Fix pytest.fail with pytrace=_False with non-ascii characters (#1178). This tests with native and unicode strings containing non-ascii chars. """ pytester.makepyfile( """\ import pytest def test_hello(): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
652
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
660
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
661
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*test_hello*", "oh oh: ☺"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
662
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*def test_hello*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
665
test_pytest_no_tests_collected_exit_status
def
function
def test_pytest_no_tests_collected_exit_status(pytester: Pytester) -> None: result = pytester.runpytest() result.stdout.fnmatch_lines(["*collected 0 items*"]) assert result.ret == ExitCode.NO_TESTS_COLLECTED pytester.makepyfile( test_foo=""" def test_foo(): assert 1 """ ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
666
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
667
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*collected 0 items*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
670
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
676
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
677
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*collected 1 item*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
678
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
681
runpytest
ref
function
result = pytester.runpytest("-k nonmatch")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
682
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*collected 1 item*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
683
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 deselected*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
687
test_exception_printing_skip
def
function
def test_exception_printing_skip() -> None: assert pytest.skip.Exception == pytest.skip.Exception try: pytest.skip("hello") except pytest.skip.Exception: excinfo = ExceptionInfo.from_current() s = excinfo.exconly(tryshort=_True) assert s.startswith("Skipped")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
690
skip
ref
function
pytest.skip("hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
692
from_current
ref
function
excinfo = ExceptionInfo.from_current()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
693
exconly
ref
function
s = excinfo.exconly(tryshort=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
697
test_importorskip
def
function
def test_importorskip(monkeypatch) -> None: importorskip = pytest.importorskip def f(): importorskip("asdlkj") try: sysmod = importorskip("sys") assert sysmod is sys # path = pytest.importorskip("os.path") # assert path == os.path excinfo = pytest.raises(pyt...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
700
f
def
function
def f(): importorskip("asdlkj") try: sysmod = importorskip("sys") assert sysmod is sys # path = pytest.importorskip("os.path") # assert path == os.path excinfo = pytest.raises(pytest.skip.Exception, f) assert excinfo is not None excrepr = excinfo....
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
701
importorskip
ref
function
importorskip("asdlkj")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
704
importorskip
ref
function
sysmod = importorskip("sys")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
708
raises
ref
function
excinfo = pytest.raises(pytest.skip.Exception, f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
710
getrepr
ref
function
excrepr = excinfo.getrepr()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
717
raises
ref
function
pytest.raises(SyntaxError, pytest.importorskip, "x y z")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
718
raises
ref
function
pytest.raises(SyntaxError, pytest.importorskip, "x=y")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
721
setitem
ref
function
monkeypatch.setitem(sys.modules, "hello123", mod)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
722
raises
ref
function
with pytest.raises(pytest.skip.Exception):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
723
importorskip
ref
function
pytest.importorskip("hello123", minversion="1.3.1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
724
importorskip
ref
function
mod2 = pytest.importorskip("hello123", minversion="1.3")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
727
from_current
ref
function
assert False, f"spurious skip: {ExceptionInfo.from_current()}"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
730
test_importorskip_imports_last_module_part
def
function
def test_importorskip_imports_last_module_part() -> None: ospath = pytest.importorskip("os.path") assert os.path == ospath
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
731
importorskip
ref
function
ospath = pytest.importorskip("os.path")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
735
test_importorskip_dev_module
def
function
def test_importorskip_dev_module(monkeypatch) -> None: try: mod = types.ModuleType("mockmodule") mod.__version__ = "0.13.0.dev-43290" # type: ignore monkeypatch.setitem(sys.modules, "mockmodule", mod) mod2 = pytest.importorskip("mockmodule", minversion="0.12.0") assert mod2 ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
739
setitem
ref
function
monkeypatch.setitem(sys.modules, "mockmodule", mod)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
740
importorskip
ref
function
mod2 = pytest.importorskip("mockmodule", minversion="0.12.0")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
742
raises
ref
function
with pytest.raises(pytest.skip.Exception):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
743
importorskip
ref
function
pytest.importorskip("mockmodule1", minversion="0.14.0")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
745
from_current
ref
function
assert False, f"spurious skip: {ExceptionInfo.from_current()}"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
748
test_importorskip_module_level
def
function
def test_importorskip_module_level(pytester: Pytester) -> None: """`importorskip` must be able to skip entire modules when used at module level.""" pytester.makepyfile( """ import pytest foobarbaz = pytest.importorskip("foobarbaz") def test_foo(): pass """ ) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
750
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
759
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
760
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*collected 0 items / 1 skipped*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
763
test_importorskip_custom_reason
def
function
def test_importorskip_custom_reason(pytester: Pytester) -> None: """Make sure custom reasons are used.""" pytester.makepyfile( """ import pytest foobarbaz = pytest.importorskip("foobarbaz2", reason="just because") def test_foo(): pass """ ) result = pytes...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
765
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
774
runpytest
ref
function
result = pytester.runpytest("-ra")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
775
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*just because*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
776
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*collected 0 items / 1 skipped*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
779
test_pytest_cmdline_main
def
function
def test_pytest_cmdline_main(pytester: Pytester) -> None: p = pytester.makepyfile( """ import pytest def test_hello(): assert 1 if __name__ == '__main__': pytest.cmdline.main([__file__]) """ ) import subprocess popen = subprocess.Popen([sys.exe...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
780
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
792
communicate
ref
function
popen.communicate()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
797
test_unicode_in_longrepr
def
function
def test_unicode_in_longrepr(pytester: Pytester) -> None: pytester.makeconftest( """\ import pytest @pytest.hookimpl(hookwrapper=_True) def pytest_runtest_makereport(): outcome = yield rep = outcome.get_result() if rep.when == "call": ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
798
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
809
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
815
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
820
test_failure_in_setup
def
function
def test_failure_in_setup(pytester: Pytester) -> None: pytester.makepyfile( """ def setup_module(): 0/0 def test_func(): pass """ ) result = pytester.runpytest("--tb=line") result.stdout.no_fnmatch_line("*def setup_module*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
821
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
829
runpytest
ref
function
result = pytester.runpytest("--tb=line")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
830
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*def setup_module*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
833
test_makereport_getsource
def
function
def test_makereport_getsource(pytester: Pytester) -> None: pytester.makepyfile( """ def test_foo(): if _False: pass else: assert _False """ ) result = pytester.runpytest() result.stdout.no_fnmatch_line("*INTERNALERROR*") result.stdout.fnmatch_lines(["*else...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
834
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
841
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
842
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*INTERNALERROR*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
843
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*else: assert False*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
846
test_makereport_getsource_dynamic_code
def
function
def test_makereport_getsource_dynamic_code( pytester: Pytester, monkeypatch: MonkeyPatch
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
858
original_findsource
ref
function
return original_findsource(obj)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
862
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
874
runpytest
ref
function
result = pytester.runpytest("-vv")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
875
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*INTERNALERROR*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
876
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*test_fix*", "*fixture*'missing'*not found*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
879
test_store_except_info_on_error
def
function
def test_store_except_info_on_error() -> None: """Test that upon test failure, the exception info is stored on sys.last_traceback and friends.""" # Simulate item that might raise a specific exception, depending on `raise_error` class var class ItemMightRaise: nodeid = "item_that_raises" ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
883
ItemMightRaise
def
class
runtest
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
887
runtest
def
function
def runtest(self): if self.raise_error: raise IndexError("TEST") try: runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type] except IndexError: pass # Check that exception info is stored on sys assert sys.last_type is IndexError as...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
892
pytest_runtest_call
ref
function
runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
892
ItemMightRaise
ref
function
runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_runner.py
testing/test_runner.py
903
pytest_runtest_call
ref
function
runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type]