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/acceptance_test.py | testing/acceptance_test.py | 140 | DummyDist | ref | function | return (DummyDist(entry_points),)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 144 | runpytest_inprocess | ref | function | pytester.runpytest_inprocess(*params)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 150 | parametrize | ref | function | @pytest.mark.parametrize("import_mode", ["prepend", "append", "importlib"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 151 | test_assertion_rewrite | def | function | def test_assertion_rewrite(self, pytester: Pytester, import_mode) -> None:
p = pytester.makepyfile(
"""
def test_this():
x = 0
assert x
"""
)
result = pytester.runpytest(p, f"--import-mode={import_mode}")
result.stdout.f... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 152 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 159 | runpytest | ref | function | result = pytester.runpytest(p, f"--import-mode={import_mode}")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 160 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["> assert x", "E assert 0"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 163 | test_nested_import_error | def | function | def test_nested_import_error(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
import import_fails
def test_this():
assert import_fails.a == 1
"""
)
pytester.makepyfile(import_fails="import does_not_work")
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 164 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 171 | makepyfile | ref | function | pytester.makepyfile(import_fails="import does_not_work")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 172 | runpytest | ref | function | result = pytester.runpytest(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 173 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 181 | test_not_collectable_arguments | def | function | def test_not_collectable_arguments(self, pytester: Pytester) -> None:
p1 = pytester.makepyfile("")
p2 = pytester.makefile(".pyc", "123")
result = pytester.runpytest(p1, p2)
assert result.ret == ExitCode.USAGE_ERROR
result.stderr.fnmatch_lines(
[
f"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 182 | makepyfile | ref | function | p1 = pytester.makepyfile("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 183 | makefile | ref | function | p2 = pytester.makefile(".pyc", "123")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 184 | runpytest | ref | function | result = pytester.runpytest(p1, p2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 186 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 195 | test_better_reporting_on_conftest_load_failure | def | function | def test_better_reporting_on_conftest_load_failure(
self, pytester: Pytester
) -> None:
"""Show a user-friendly traceback on conftest import failures (#486, #3332)"""
pytester.makepyfile("")
conftest = pytester.makeconftest(
"""
def foo():
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 199 | makepyfile | ref | function | pytester.makepyfile("")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 200 | makeconftest | ref | function | conftest = pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 207 | runpytest | ref | function | result = pytester.runpytest("--help")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 208 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 214 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 225 | test_early_skip | def | function | def test_early_skip(self, pytester: Pytester) -> None:
pytester.mkdir("xyz")
pytester.makeconftest(
"""
import pytest
def pytest_collect_file():
pytest.skip("early")
"""
)
result = pytester.runpytest()
assert result.... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 227 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 234 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 236 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 skip*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 238 | test_issue88_initial_file_multinodes | def | function | def test_issue88_initial_file_multinodes(self, pytester: Pytester) -> None:
pytester.copy_example("issue88_initial_file_multinodes")
p = pytester.makepyfile("def test_hello(): pass")
result = pytester.runpytest(p, "--collect-only")
result.stdout.fnmatch_lines(["*MyFile*test_issue88*"... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 239 | copy_example | ref | function | pytester.copy_example("issue88_initial_file_multinodes")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 240 | makepyfile | ref | function | p = pytester.makepyfile("def test_hello(): pass")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 241 | runpytest | ref | function | result = pytester.runpytest(p, "--collect-only")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 242 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*MyFile*test_issue88*", "*Module*test_issue88*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 244 | test_issue93_initialnode_importing_capturing | def | function | def test_issue93_initialnode_importing_capturing(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import sys
print("should not be seen")
sys.stderr.write("stder42\\n")
"""
)
result = pytester.runpytest()
assert resu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 245 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 252 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 254 | no_fnmatch_line | ref | function | result.stdout.no_fnmatch_line("*should not be seen*")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 257 | test_conftest_printing_shows_if_error | def | function | def test_conftest_printing_shows_if_error(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
print("should be seen")
assert 0
"""
)
result = pytester.runpytest()
assert result.ret != 0
assert "should be seen" in result.st... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 258 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 264 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 268 | test_issue109_sibling_conftests_not_loaded | def | function | def test_issue109_sibling_conftests_not_loaded(self, pytester: Pytester) -> None:
sub1 = pytester.mkdir("sub1")
sub2 = pytester.mkdir("sub2")
sub1.joinpath("conftest.py").write_text("assert 0")
result = pytester.runpytest(sub2)
assert result.ret == ExitCode.NO_TESTS_COLLECTED... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 271 | joinpath | ref | function | sub1.joinpath("conftest.py").write_text("assert 0")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 271 | write_text | ref | function | sub1.joinpath("conftest.py").write_text("assert 0")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 272 | runpytest | ref | function | result = pytester.runpytest(sub2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 274 | joinpath | ref | function | sub2.joinpath("__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 274 | touch | ref | function | sub2.joinpath("__init__.py").touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 275 | joinpath | ref | function | p = sub2.joinpath("test_hello.py")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 276 | touch | ref | function | p.touch()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 277 | runpytest | ref | function | result = pytester.runpytest(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 279 | runpytest | ref | function | result = pytester.runpytest(sub1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 282 | test_directory_skipped | def | function | def test_directory_skipped(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import pytest
def pytest_ignore_collect():
pytest.skip("intentional")
"""
)
pytester.makepyfile("def test_hello(): pass")
result = pyte... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 283 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 290 | makepyfile | ref | function | pytester.makepyfile("def test_hello(): pass")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 291 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 293 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 skipped*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 295 | test_multiple_items_per_collector_byid | def | function | def test_multiple_items_per_collector_byid(self, pytester: Pytester) -> None:
c = pytester.makeconftest(
"""
import pytest
class MyItem(pytest.Item):
def runtest(self):
pass
class MyCollector(pytest.File):
de... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 296 | makeconftest | ref | function | c = pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 310 | runpytest | ref | function | result = pytester.runpytest(c.name + "::" + "xyz")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 312 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*1 pass*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 314 | test_skip_on_generated_funcarg_id | def | function | def test_skip_on_generated_funcarg_id(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
import pytest
def pytest_generate_tests(metafunc):
metafunc.parametrize('x', [3], ids=['hello-123'])
def pytest_runtest_setup(item):
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 315 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 327 | makepyfile | ref | function | p = pytester.makepyfile("""def test_func(x): pass""")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 328 | runpytest | ref | function | res = pytester.runpytest(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 330 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(["*1 skipped*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 332 | test_direct_addressing_selects | def | function | def test_direct_addressing_selects(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def pytest_generate_tests(metafunc):
metafunc.parametrize('i', [1, 2], ids=["1", "2"])
def test_func(i):
pass
"""
)
r... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 333 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 341 | runpytest | ref | function | res = pytester.runpytest(p.name + "::" + "test_func[1]")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 343 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(["*1 passed*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 345 | test_direct_addressing_notfound | def | function | def test_direct_addressing_notfound(self, pytester: Pytester) -> None:
p = pytester.makepyfile(
"""
def test_func():
pass
"""
)
res = pytester.runpytest(p.name + "::" + "test_notfound")
assert res.ret
res.stderr.fnmatch_lines(["... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 346 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 352 | runpytest | ref | function | res = pytester.runpytest(p.name + "::" + "test_notfound")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 354 | fnmatch_lines | ref | function | res.stderr.fnmatch_lines(["*ERROR*not found*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 356 | test_docstring_on_hookspec | def | function | def test_docstring_on_hookspec(self) -> None:
from _pytest import hookspec
for name, value in vars(hookspec).items():
if name.startswith("pytest_"):
assert value.__doc__, "no docstring for %s" % name
def test_initialization_error_issue49(self, pytester: Pytester) ->... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 363 | test_initialization_error_issue49 | def | function | def test_initialization_error_issue49(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
def pytest_configure():
x
"""
)
result = pytester.runpytest()
assert result.ret == 3 # internal error
result.stderr.fnmatch_lin... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 364 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 370 | runpytest | ref | function | result = pytester.runpytest()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 372 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines(["INTERNAL*pytest_configure*", "INTERNAL*x*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 375 | parametrize | ref | function | @pytest.mark.parametrize("lookfor", ["test_fun.py::test_a"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 376 | test_issue134_report_error_when_collecting_member | def | function | def test_issue134_report_error_when_collecting_member(
self, pytester: Pytester, lookfor
) -> None:
pytester.makepyfile(
test_fun="""
def test_a():
pass
def"""
)
result = pytester.runpytest(lookfor)
result.stdout.fnmatch... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 379 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 385 | runpytest | ref | function | result = pytester.runpytest(lookfor)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 386 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["*SyntaxError*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 388 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines(["*ERROR*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 391 | test_report_all_failed_collections_initargs | def | function | def test_report_all_failed_collections_initargs(self, pytester: Pytester) -> None:
pytester.makeconftest(
"""
from _pytest.config import ExitCode
def pytest_sessionfinish(exitstatus):
assert exitstatus == ExitCode.USAGE_ERROR
print("pytest... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 392 | makeconftest | ref | function | pytester.makeconftest(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 401 | makepyfile | ref | function | pytester.makepyfile(test_a="def", test_b="def")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 402 | runpytest | ref | function | result = pytester.runpytest("test_a.py::a", "test_b.py::b")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 403 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines(["*ERROR*test_a.py::a*", "*ERROR*test_b.py::b*"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 404 | fnmatch_lines | ref | function | result.stdout.fnmatch_lines(["pytest_sessionfinish_called"])
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 407 | test_namespace_import_doesnt_confuse_import_hook | def | function | def test_namespace_import_doesnt_confuse_import_hook(
self, pytester: Pytester
) -> None:
"""Ref #383.
Python 3.3's namespace package messed with our import hooks.
Importing a module that didn't exist, even if the ImportError was
gracefully handled, would make our test c... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 417 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 429 | runpytest | ref | function | res = pytester.runpytest(p.name)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 432 | test_unknown_option | def | function | def test_unknown_option(self, pytester: Pytester) -> None:
result = pytester.runpytest("--qwlkej")
result.stderr.fnmatch_lines(
"""
*unrecognized*
"""
)
def test_getsourcelines_error_issue553(
self, pytester: Pytester, monkeypatch
) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 433 | runpytest | ref | function | result = pytester.runpytest("--qwlkej")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 434 | fnmatch_lines | ref | function | result.stderr.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 440 | test_getsourcelines_error_issue553 | def | function | def test_getsourcelines_error_issue553(
self, pytester: Pytester, monkeypatch
) -> None:
monkeypatch.setattr("inspect.getsourcelines", None)
p = pytester.makepyfile(
"""
def raise_error(obj):
raise OSError('source code not available')
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 444 | makepyfile | ref | function | p = pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 456 | runpytest | ref | function | res = pytester.runpytest(p)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 457 | fnmatch_lines | ref | function | res.stdout.fnmatch_lines(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 461 | test_plugins_given_as_strings | def | function | def test_plugins_given_as_strings(
self, pytester: Pytester, monkeypatch, _sys_snapshot
) -> None:
"""Test that str values passed to main() as `plugins` arg are
interpreted as module names to be imported and registered (#855)."""
with pytest.raises(ImportError) as excinfo:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/acceptance_test.py | testing/acceptance_test.py | 466 | raises | ref | function | with pytest.raises(ImportError) as excinfo:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.