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_runner.py | testing/test_runner.py | 874 | runpytest | ref | function | result = pytester.runpytest("-vv")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 875 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*INTERNALERROR*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 883 | ItemMightRaise | def | class | runtest |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 892 | ItemMightRaise | ref | function | runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 903 | pytest_runtest_call | ref | function | runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 903 | ItemMightRaise | ref | function | runner.pytest_runtest_call(ItemMightRaise()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 909 | test_current_test_env_var | def | function | def test_current_test_env_var(pytester: Pytester, monkeypatch: MonkeyPatch) -> None:
pytest_current_test_vars: List[Tuple[str, str]] = []
monkeypatch.setattr(
sys, "pytest_current_test_vars", pytest_current_test_vars, raising=_False
)
pytester.makepyfile(
"""
import pytest
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 914 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 930 | runpytest_inprocess | ref | function | result = pytester.runpytest_inprocess()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 941 | TestReportContents | def | class | getrunner test_longreprtext_pass test_longreprtext_skip test_longreprtext_collect_skip test_longreprtext_failure test_captured_text test_no_captured_text test_longrepr_type |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 944 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 945 | runtestprotocol | ref | function | return lambda item: runner.runtestprotocol(item, log=False)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 947 | test_longreprtext_pass | def | function | def test_longreprtext_pass(self, pytester: Pytester) -> None:
reports = pytester.runitem(
"""
def test_func():
pass
"""
)
rep = reports[1]
assert rep.longreprtext == ""
def test_longreprtext_skip(self, pytester: Pytester) -> None:
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 948 | runitem | ref | function | reports = pytester.runitem(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 957 | test_longreprtext_skip | def | function | def test_longreprtext_skip(self, pytester: Pytester) -> None:
"""TestReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)"""
reports = pytester.runitem(
"""
import pytest
def test_func():
pytest.skip()
"""
)
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 959 | runitem | ref | function | reports = pytester.runitem(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 970 | test_longreprtext_collect_skip | def | function | def test_longreprtext_collect_skip(self, pytester: Pytester) -> None:
"""CollectReport.longreprtext can handle non-str ``longrepr`` attributes (#7559)"""
pytester.makepyfile(
"""
import pytest
pytest.skip(allow_module_level=_True)
"""
)
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 972 | makepyfile | ref | function | pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 978 | inline_run | ref | function | rec = pytester.inline_run()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 979 | getcalls | ref | function | calls = rec.getcalls("pytest_collectreport")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 984 | test_longreprtext_failure | def | function | def test_longreprtext_failure(self, pytester: Pytester) -> None:
reports = pytester.runitem(
"""
def test_func():
x = 1
assert x == 4
"""
)
rep = reports[1]
assert "assert 1 == 4" in rep.longreprtext
def test_captur... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 985 | runitem | ref | function | reports = pytester.runitem(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 995 | test_captured_text | def | function | def test_captured_text(self, pytester: Pytester) -> None:
reports = pytester.runitem(
"""
import pytest
import sys
@pytest.fixture
def fix():
sys.stdout.write('setup: stdout\\n')
sys.stderr.write('setup: stderr\\n')... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 996 | runitem | ref | function | reports = pytester.runitem(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,025 | test_no_captured_text | def | function | def test_no_captured_text(self, pytester: Pytester) -> None:
reports = pytester.runitem(
"""
def test_func():
pass
"""
)
rep = reports[1]
assert rep.capstdout == ""
assert rep.capstderr == ""
def test_longrepr_type(self, py... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,026 | runitem | ref | function | reports = pytester.runitem(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,036 | test_longrepr_type | def | function | def test_longrepr_type(self, pytester: Pytester) -> None:
reports = pytester.runitem(
"""
import pytest
def test_func():
pytest.fail(pytrace=_False)
"""
)
rep = reports[1]
assert isinstance(rep.longrepr, ExceptionChainRepr)
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,037 | runitem | ref | function | reports = pytester.runitem(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,048 | test_outcome_exception_bad_msg | def | function | def test_outcome_exception_bad_msg() -> None:
"""Check that OutcomeExceptions validate their input to prevent confusing errors (#5578)"""
def func() -> None:
raise NotImplementedError()
expected = (
"OutcomeException expected string as 'msg' parameter, got 'function' instead.\n"
"P... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,051 | func | def | function | def func() -> None:
raise NotImplementedError()
expected = (
"OutcomeException expected string as 'msg' parameter, got 'function' instead.\n"
"Perhaps you meant to use a mark?"
)
with pytest.raises(TypeError) as excinfo:
OutcomeException(func) # type: ignore
assert ... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,058 | raises | ref | function | with pytest.raises(TypeError) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner.py | testing/test_runner.py | 1,059 | OutcomeException | ref | function | OutcomeException(func) # type: ignore
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 7 | test_module_and_function_setup | def | function | def test_module_and_function_setup(pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
modlevel = []
def setup_module(module):
assert not modlevel
module.modlevel.append(42)
def teardown_module(module):
modlevel.pop()
def... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 8 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 34 | matchreport | ref | function | rep = reprec.matchreport("test_modlevel")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 36 | matchreport | ref | function | rep = reprec.matchreport("test_module")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 40 | test_module_setup_failure_no_teardown | def | function | def test_module_setup_failure_no_teardown(pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
values = []
def setup_module(module):
values.append(1)
0/0
def test_nothing():
pass
def teardown_module(module):
va... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 41 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 55 | assertoutcome | ref | function | reprec.assertoutcome(failed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 56 | getcalls | ref | function | calls = reprec.getcalls("pytest_runtest_setup")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 60 | test_setup_function_failure_no_teardown | def | function | def test_setup_function_failure_no_teardown(pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
modlevel = []
def setup_function(function):
modlevel.append(1)
0/0
def teardown_function(module):
modlevel.append(2)
def test... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 61 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 75 | getcalls | ref | function | calls = reprec.getcalls("pytest_runtest_setup")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 79 | test_class_setup | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 80 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 102 | assertoutcome | ref | function | reprec.assertoutcome(passed=1 + 2 + 1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 105 | test_class_setup_failure_no_teardown | def | class | |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 106 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 123 | assertoutcome | ref | function | reprec.assertoutcome(failed=1, passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 126 | test_method_setup | def | function | def test_method_setup(pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
class TestSetupMethod(object):
def setup_method(self, meth):
self.methsetup = meth
def teardown_method(self, meth):
del self.methsetup
def t... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 127 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 142 | assertoutcome | ref | function | reprec.assertoutcome(passed=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 145 | test_method_setup_failure_no_teardown | def | function | def test_method_setup_failure_no_teardown(pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
class TestMethodSetup(object):
clslevel = []
def setup_method(self, method):
self.clslevel.append(1)
0/0
def teardown_me... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 146 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 164 | assertoutcome | ref | function | reprec.assertoutcome(failed=1, passed=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 167 | test_method_setup_uses_fresh_instances | def | function | def test_method_setup_uses_fresh_instances(pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
class TestSelfState1(object):
memory = []
def test_hello(self):
self.memory.append(self)
def test_afterhello(self):
ass... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 168 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 179 | assertoutcome | ref | function | reprec.assertoutcome(passed=2, failed=0)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 182 | test_setup_that_skips_calledagain | def | function | def test_setup_that_skips_calledagain(pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
import pytest
def setup_module(mod):
pytest.skip("x")
def test_function1():
pass
def test_function2():
pass
"""
)
reprec = pytester.... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 183 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 194 | inline_run | ref | function | reprec = pytester.inline_run(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 195 | assertoutcome | ref | function | reprec.assertoutcome(skipped=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 198 | test_setup_fails_again_on_all_tests | def | function | def test_setup_fails_again_on_all_tests(pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
import pytest
def setup_module(mod):
raise ValueError(42)
def test_function1():
pass
def test_function2():
pass
"""
)
reprec = pyt... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 199 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 210 | inline_run | ref | function | reprec = pytester.inline_run(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 211 | assertoutcome | ref | function | reprec.assertoutcome(failed=2)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 214 | test_setup_funcarg_setup_when_outer_scope_fails | def | function | def test_setup_funcarg_setup_when_outer_scope_fails(pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
import pytest
def setup_module(mod):
raise ValueError(42)
@pytest.fixture
def hello(request):
raise ValueError("xyz43")
def test_funct... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 215 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 229 | runpytest | ref | function | result = pytester.runpytest(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 230 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 239 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*xyz43*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 242 | parametrize | ref | function | @pytest.mark.parametrize("arg", ["", "arg"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 243 | test_setup_teardown_function_level_with_optional_argument | def | function | def test_setup_teardown_function_level_with_optional_argument(
pytester: Pytester,
monkeypatch,
arg: str,
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 255 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 281 | inline_run | ref | function | result = pytester.inline_run(p)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_runner_xunit.py | testing/test_runner_xunit.py | 282 | assertoutcome | ref | function | result.assertoutcome(passed=4)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 6 | SessionTests | def | class | test_basic_testitem_events test_nested_import_error test_raises_output test_syntax_error_module test_exit_first_problem test_maxfail test_broken_repr test_broken_repr_with_showlocals_verbose test_skip_file_by_conftest |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 7 | test_basic_testitem_events | def | function | def test_basic_testitem_events(self, pytester: Pytester) -> None:
tfile = pytester.makepyfile(
"""
def test_one():
pass
def test_one_one():
assert 0
def test_other():
raise ValueError(23)
class TestCl... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 8 | makepyfile | ref | function | tfile = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 21 | inline_run | ref | function | reprec = pytester.inline_run(tfile)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 22 | listoutcomes | ref | function | passed, skipped, failed = reprec.listoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 27 | end | def | function | def end(x):
return x.nodeid.split("::")[-1]
assert end(failed[0]) == "test_one_one"
assert end(failed[1]) == "test_other"
itemstarted = reprec.getcalls("pytest_itemcollected")
assert len(itemstarted) == 4
# XXX check for failing funcarg setup
# colrep... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 30 | end | ref | function | assert end(failed[0]) == "test_one_one"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 31 | end | ref | function | assert end(failed[1]) == "test_other"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 32 | getcalls | ref | function | itemstarted = reprec.getcalls("pytest_itemcollected")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 39 | test_nested_import_error | def | function | def test_nested_import_error(self, pytester: Pytester) -> None:
tfile = pytester.makepyfile(
"""
import import_fails
def test_this():
assert import_fails.a == 1
""",
import_fails="""
import does_not_work
a = 1
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 40 | makepyfile | ref | function | tfile = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 51 | inline_run | ref | function | reprec = pytester.inline_run(tfile)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 52 | getfailedcollections | ref | function | values = reprec.getfailedcollections()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 57 | test_raises_output | def | function | def test_raises_output(self, pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
import pytest
def test_raises_doesnt():
pytest.raises(ValueError, int, "3")
"""
)
passed, skipped, failed = reprec.listoutcomes()
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 58 | inline_runsource | ref | function | reprec = pytester.inline_runsource(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 65 | listoutcomes | ref | function | passed, skipped, failed = reprec.listoutcomes()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 70 | test_syntax_error_module | def | function | def test_syntax_error_module(self, pytester: Pytester) -> None:
reprec = pytester.inline_runsource("this is really not python")
values = reprec.getfailedcollections()
assert len(values) == 1
out = str(values[0].longrepr)
assert out.find("not python") != -1
def test_exit_... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 71 | inline_runsource | ref | function | reprec = pytester.inline_runsource("this is really not python")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 72 | getfailedcollections | ref | function | values = reprec.getfailedcollections()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_session.py | testing/test_session.py | 77 | test_exit_first_problem | def | function | def test_exit_first_problem(self, pytester: Pytester) -> None:
reprec = pytester.inline_runsource(
"""
def test_one(): assert 0
def test_two(): assert 0
""",
"--exitfirst",
)
passed, skipped, failed = reprec.countoutcomes()
asse... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.