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_collection.py
testing/test_collection.py
20
ensure_file
def
function
def ensure_file(file_path: Path) -> Path: """Ensure that file exists""" file_path.parent.mkdir(parents=_True, exist_ok=_True) file_path.touch(exist_ok=_True) return file_path
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
27
TestCollector
def
class
test_collect_versus_item test_check_equality test_getparent test_getcustomfile_roundtrip test_can_skip_class_with_test_attr
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
28
test_collect_versus_item
def
function
def test_collect_versus_item(self) -> None: from pytest import Collector from pytest import Item assert not issubclass(Collector, Item) assert not issubclass(Item, Collector) def test_check_equality(self, pytester: Pytester) -> None: modcol = pytester.getmodulecol( ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
35
test_check_equality
def
function
def test_check_equality(self, pytester: Pytester) -> None: modcol = pytester.getmodulecol( """ def test_pass(): pass def test_fail(): assert 0 """ ) fn1 = pytester.collect_by_name(modcol, "test_pass") assert isinstance(fn1, pytest.Function)...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
36
getmodulecol
ref
function
modcol = pytester.getmodulecol(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
42
collect_by_name
ref
function
fn1 = pytester.collect_by_name(modcol, "test_pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
44
collect_by_name
ref
function
fn2 = pytester.collect_by_name(modcol, "test_pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
51
collect_by_name
ref
function
fn3 = pytester.collect_by_name(modcol, "test_fail")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
64
collect_by_name
ref
function
assert pytester.collect_by_name(modcol, "doesnotexist") is None
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
66
test_getparent
def
function
def test_getparent(self, pytester: Pytester) -> None: modcol = pytester.getmodulecol( """ class TestClass: def test_foo(self): pass """ ) cls = pytester.collect_by_name(modcol, "TestClass") assert isinstance(cls, p...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
67
getmodulecol
ref
function
modcol = pytester.getmodulecol(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
74
collect_by_name
ref
function
cls = pytester.collect_by_name(modcol, "TestClass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
76
collect_by_name
ref
function
fn = pytester.collect_by_name(cls, "test_foo")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
79
getparent
ref
function
module_parent = fn.getparent(pytest.Module)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
82
getparent
ref
function
function_parent = fn.getparent(pytest.Function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
85
getparent
ref
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
88
test_getcustomfile_roundtrip
def
function
def test_getcustomfile_roundtrip(self, pytester: Pytester) -> None: hello = pytester.makefile(".xxx", hello="world") pytester.makepyfile( conftest=""" import pytest class CustomFile(pytest.File): pass def pytest_collect_file(fspath, par...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
89
makefile
ref
function
hello = pytester.makefile(".xxx", hello="world")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
90
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
100
getpathnode
ref
function
node = pytester.getpathnode(hello)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
103
perform_collect
ref
function
nodes = node.session.perform_collect([node.nodeid], genitems=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
107
test_can_skip_class_with_test_attr
def
class
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
109
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
119
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
120
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["collected 0 items", "*no tests ran in*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
123
TestCollectFS
def
class
test_ignored_certain_directories test_ignored_virtualenvs test_ignored_virtualenvs_norecursedirs_precedence test__in_venv test_custom_norecursedirs test_testpaths_ini
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
124
test_ignored_certain_directories
def
function
def test_ignored_certain_directories(self, pytester: Pytester) -> None: tmp_path = pytester.path ensure_file(tmp_path / "build" / "test_notfound.py") ensure_file(tmp_path / "dist" / "test_notfound.py") ensure_file(tmp_path / "_darcs" / "test_notfound.py") ensure_file(tmp_path...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
126
ensure_file
ref
function
ensure_file(tmp_path / "build" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
127
ensure_file
ref
function
ensure_file(tmp_path / "dist" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
128
ensure_file
ref
function
ensure_file(tmp_path / "_darcs" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
129
ensure_file
ref
function
ensure_file(tmp_path / "CVS" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
130
ensure_file
ref
function
ensure_file(tmp_path / "{arch}" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
131
ensure_file
ref
function
ensure_file(tmp_path / ".whatever" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
132
ensure_file
ref
function
ensure_file(tmp_path / ".bzr" / "test_notfound.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
133
ensure_file
ref
function
ensure_file(tmp_path / "normal" / "test_found.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
137
runpytest
ref
function
result = pytester.runpytest("--collect-only")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
142
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
153
test_ignored_virtualenvs
def
function
def test_ignored_virtualenvs(self, pytester: Pytester, fname: str) -> None: bindir = "Scripts" if sys.platform.startswith("win") else "bin" ensure_file(pytester.path / "virtual" / bindir / fname) testfile = ensure_file(pytester.path / "virtual" / "test_invenv.py") testfile.write_text...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
155
ensure_file
ref
function
ensure_file(pytester.path / "virtual" / bindir / fname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
156
ensure_file
ref
function
testfile = ensure_file(pytester.path / "virtual" / "test_invenv.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
160
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
161
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*test_invenv*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
163
runpytest
ref
function
result = pytester.runpytest("--collect-in-virtualenv")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
166
runpytest
ref
function
result = pytester.runpytest("virtual")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
169
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
180
test_ignored_virtualenvs_norecursedirs_precedence
def
function
def test_ignored_virtualenvs_norecursedirs_precedence( self, pytester: Pytester, fname: str ) -> None: bindir = "Scripts" if sys.platform.startswith("win") else "bin" # norecursedirs takes priority ensure_file(pytester.path / ".virtual" / bindir / fname) testfile = ensure...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
185
ensure_file
ref
function
ensure_file(pytester.path / ".virtual" / bindir / fname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
186
ensure_file
ref
function
testfile = ensure_file(pytester.path / ".virtual" / "test_invenv.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
188
runpytest
ref
function
result = pytester.runpytest("--collect-in-virtualenv")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
189
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*test_invenv*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
191
runpytest
ref
function
result = pytester.runpytest("--collect-in-virtualenv", ".virtual")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
194
parametrize
ref
function
@pytest.mark.parametrize(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
205
test__in_venv
def
function
def test__in_venv(self, pytester: Pytester, fname: str) -> None: """Directly test the virtual env detection function""" bindir = "Scripts" if sys.platform.startswith("win") else "bin" # no bin/activate, not a virtualenv base_path = pytester.mkdir("venv") assert _in_venv(base_...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
210
_in_venv
ref
function
assert _in_venv(base_path) is False
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
215
_in_venv
ref
function
assert _in_venv(base_path) is True
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
217
test_custom_norecursedirs
def
function
def test_custom_norecursedirs(self, pytester: Pytester) -> None: pytester.makeini( """ [pytest] norecursedirs = mydir xyz* """ ) tmp_path = pytester.path ensure_file(tmp_path / "mydir" / "test_hello.py").write_text( "def test_1(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
218
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
225
ensure_file
ref
function
ensure_file(tmp_path / "mydir" / "test_hello.py").write_text(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
228
ensure_file
ref
function
ensure_file(tmp_path / "xyz123" / "test_2.py").write_text("def test_2(): 0/0")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
229
ensure_file
ref
function
ensure_file(tmp_path / "xy" / "test_ok.py").write_text("def test_3(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
230
inline_run
ref
function
rec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
231
assertoutcome
ref
function
rec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
232
inline_run
ref
function
rec = pytester.inline_run("xyz123/test_2.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
233
assertoutcome
ref
function
rec.assertoutcome(failed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
235
test_testpaths_ini
def
function
def test_testpaths_ini(self, pytester: Pytester, monkeypatch: MonkeyPatch) -> None: pytester.makeini( """ [pytest] testpaths = gui uts """ ) tmp_path = pytester.path ensure_file(tmp_path / "env" / "test_1.py").write_text("def test_env(): pa...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
236
makeini
ref
function
pytester.makeini(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
243
ensure_file
ref
function
ensure_file(tmp_path / "env" / "test_1.py").write_text("def test_env(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
244
ensure_file
ref
function
ensure_file(tmp_path / "gui" / "test_2.py").write_text("def test_gui(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
245
ensure_file
ref
function
ensure_file(tmp_path / "uts" / "test_3.py").write_text("def test_uts(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
249
inline_genitems
ref
function
items, reprec = pytester.inline_genitems("-v")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
255
inline_genitems
ref
function
items, reprec = pytester.inline_genitems(tmp_path.joinpath(dirname))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
262
inline_genitems
ref
function
items, reprec = pytester.inline_genitems()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
266
TestCollectPluginHookRelay
def
class
test_pytest_collect_file
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
267
test_pytest_collect_file
def
function
def test_pytest_collect_file(self, pytester: Pytester) -> None: wascalled = [] class Plugin: def pytest_collect_file(self, fspath: Path) -> None: if not fspath.name.startswith("."): # Ignore hidden files, e.g. .testmondata. wascall...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
270
Plugin
def
class
pytest_collect_file
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
271
pytest_collect_file
def
function
def pytest_collect_file(self, fspath: Path) -> None: if not fspath.name.startswith("."): # Ignore hidden files, e.g. .testmondata. wascalled.append(fspath) pytester.makefile(".abc", "xyz") pytest.main(pytester.path, plugins=[Plugin()])...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
276
makefile
ref
function
pytester.makefile(".abc", "xyz")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
277
main
ref
function
pytest.main(pytester.path, plugins=[Plugin()])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
277
Plugin
ref
function
pytest.main(pytester.path, plugins=[Plugin()])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
282
TestPrunetraceback
def
class
test_custom_repr_failure test_collect_report_postprocessing
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
283
test_custom_repr_failure
def
function
def test_custom_repr_failure(self, pytester: Pytester) -> None: p = pytester.makepyfile( """ import not_exists """ ) pytester.makeconftest( """ import pytest def pytest_collect_file(fspath, parent): return My...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
284
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
289
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
306
runpytest
ref
function
result = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
307
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*ERROR collecting*", "*hello world*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
309
xfail
ref
function
@pytest.mark.xfail(reason="other mechanism for adding to reporting needed")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
310
test_collect_report_postprocessing
def
function
def test_collect_report_postprocessing(self, pytester: Pytester) -> None: p = pytester.makepyfile( """ import not_exists """ ) pytester.makeconftest( """ import pytest @pytest.hookimpl(hookwrapper=_True) def pyte...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
311
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
316
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
327
runpytest
ref
function
result = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
328
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*ERROR collecting*", "*header1*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
331
TestCustomConftests
def
class
test_ignore_collect_path test_ignore_collect_not_called_on_argument test_collectignore_exclude_on_option test_collectignoreglob_exclude_on_option test_pytest_fs_collect_hooks_are_seen test_pytest_collect_file_from_sister_dir
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
332
test_ignore_collect_path
def
function
def test_ignore_collect_path(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_ignore_collect(fspath, config): return fspath.name.startswith("x") or fspath.name == "test_one.py" """ ) sub = pytester.mkdir("xy123") ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
333
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
340
ensure_file
ref
function
ensure_file(sub / "test_hello.py").write_text("syntax error")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
342
makepyfile
ref
function
pytester.makepyfile("def test_hello(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
343
makepyfile
ref
function
pytester.makepyfile(test_one="syntax error")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
344
runpytest
ref
function
result = pytester.runpytest("--fulltrace")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
346
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_collection.py
testing/test_collection.py
348
test_ignore_collect_not_called_on_argument
def
function
def test_ignore_collect_not_called_on_argument(self, pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_ignore_collect(fspath, config): return _True """ ) p = pytester.makepyfile("def test_hello(): pass") result = pytest...