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/code/test_source.py
testing/code/test_source.py
605
getstatement
ref
function
source = getstatement(0, s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
609
test_def_online
def
function
def test_def_online() -> None: s = """\
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
616
getstatement
ref
function
source = getstatement(0, s)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
620
XXX_test_expression_multiline
def
function
def XXX_test_expression_multiline() -> None: source = """\
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
625
getstatement
ref
function
result = getstatement(1, source)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
629
test_getstartingblock_multiline
def
function
def test_getstartingblock_multiline() -> None: class A: def __init__(self, *args): frame = sys._getframe(1) self.source = Frame(frame).statement # fmt: off x = A('x', 'y' , 'z') # fmt: on values = [i for i in x.source.lines if i.strip()]...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
630
A
def
class
__init__ __init__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
633
Frame
ref
function
self.source = Frame(frame).statement
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/code/test_source.py
testing/code/test_source.py
636
A
ref
function
x = A('x',
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
10
fixture
ref
function
@pytest.fixture(autouse=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
11
restore_tracing
def
function
def restore_tracing(): """Restore tracing function (when run with Coverage.py). https://bugs.python.org/issue37011 """ orig_trace = sys.gettrace() yield if sys.gettrace() != orig_trace: sys.settrace(orig_trace)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
22
hookimpl
ref
function
@pytest.hookimpl(hookwrapper=True, tryfirst=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
23
pytest_collection_modifyitems
def
function
def pytest_collection_modifyitems(items): """Prefer faster tests. Use a hookwrapper to do this in the beginning, so e.g. --ff still works correctly. """ fast_items = [] slow_items = [] slowest_items = [] neutral_items = [] spawn_names = {"spawn_pytest", "spawn"} for item in it...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
47
add_marker
ref
function
item.add_marker(pytest.mark.uses_pexpect)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
53
add_marker
ref
function
item.add_marker(pytest.mark.slow)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
55
get_closest_marker
ref
function
marker = item.get_closest_marker("slow")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
67
tw_mock
def
function
def tw_mock(): """Returns a mock terminal writer""" class TWMock: WRITE = object() def __init__(self): self.lines = [] self.is_writing = _False def sep(self, sep, line=None): self.lines.append((sep, line)) def write(self, msg, **kw): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
70
TWMock
def
class
__init__ sep write _write_source line markup get_write_msg
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
77
sep
def
function
def sep(self, sep, line=None): self.lines.append((sep, line)) def write(self, msg, **kw): self.lines.append((TWMock.WRITE, msg)) def _write_source(self, lines, indents=()): if not indents: indents = [""] * len(lines) for indent, l...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
80
write
def
function
def write(self, msg, **kw): self.lines.append((TWMock.WRITE, msg)) def _write_source(self, lines, indents=()): if not indents: indents = [""] * len(lines) for indent, line in zip(indents, lines): self.line(indent + line) def l...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
83
_write_source
def
function
def _write_source(self, lines, indents=()): if not indents: indents = [""] * len(lines) for indent, line in zip(indents, lines): self.line(indent + line) def line(self, line, **kw): self.lines.append(line) def markup(self, tex...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
87
line
ref
function
self.line(indent + line)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
89
line
def
function
def line(self, line, **kw): self.lines.append(line) def markup(self, text, **kw): return text def get_write_msg(self, idx): flag, msg = self.lines[idx] assert flag == TWMock.WRITE return msg fullwidth = 80 return TWMock(...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
92
markup
def
function
def markup(self, text, **kw): return text def get_write_msg(self, idx): flag, msg = self.lines[idx] assert flag == TWMock.WRITE return msg fullwidth = 80 return TWMock()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
95
get_write_msg
def
function
def get_write_msg(self, idx): flag, msg = self.lines[idx] assert flag == TWMock.WRITE return msg fullwidth = 80 return TWMock()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
102
TWMock
ref
function
return TWMock()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
106
dummy_yaml_custom_test
def
function
def dummy_yaml_custom_test(pytester: Pytester): """Writes a conftest file that collects and executes a dummy yaml test. Taken from the docs, but stripped down to the bare minimum, useful for tests which needs custom items collected. """ pytester.makeconftest( """ import pytest ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
112
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
129
makefile
ref
function
pytester.makefile(".yaml", test1="")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
133
pytester
def
function
def pytester(pytester: Pytester, monkeypatch: MonkeyPatch) -> Pytester: monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1") return pytester
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
134
setenv
ref
function
monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
138
fixture
ref
function
@pytest.fixture(scope="session")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
139
color_mapping
def
function
def color_mapping(): """Returns a utility class which can replace keys in strings in the form "{NAME}" by their equivalent ASCII codes in the terminal. Used by tests which check the actual colors output by pytest. """ class ColorMapping: COLORS = { "red": "\x1b[31m", ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
146
ColorMapping
def
class
format format_for_fnmatch format_for_rematch
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
168
format_for_fnmatch
def
function
def format_for_fnmatch(cls, lines: List[str]) -> List[str]: """Replace color names for use with LineMatcher.fnmatch_lines""" return [line.format(**cls.COLORS).replace("[", "[[]") for line in lines] @classmethod def format_for_rematch(cls, lines: List[str]) -> List[str]: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
173
format_for_rematch
def
function
def format_for_rematch(cls, lines: List[str]) -> List[str]: """Replace color names for use with LineMatcher.re_match_lines""" return [line.format(**cls.RE_COLORS) for line in lines] return ColorMapping
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
181
mock_timing
def
function
def mock_timing(monkeypatch: MonkeyPatch): """Mocks _pytest.timing with a known object that can be used to control timing in tests deterministically. pytest itself should always use functions from `_pytest.timing` instead of `time` directly. This then allows us more control over time during testing, i...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
196
MockTiming
def
class
sleep time patch
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
200
sleep
def
function
def sleep(self, seconds): self._current_time += seconds def time(self): return self._current_time def patch(self): from _pytest import timing monkeypatch.setattr(timing, "sleep", self.sleep) monkeypatch.setattr(timing, "time", self.t...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
203
time
def
function
def time(self): return self._current_time def patch(self): from _pytest import timing monkeypatch.setattr(timing, "sleep", self.sleep) monkeypatch.setattr(timing, "time", self.time) monkeypatch.setattr(timing, "perf_counter", self.time) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
206
patch
def
function
def patch(self): from _pytest import timing monkeypatch.setattr(timing, "sleep", self.sleep) monkeypatch.setattr(timing, "time", self.time) monkeypatch.setattr(timing, "perf_counter", self.time) result = MockTiming() result.patch() return result
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
213
MockTiming
ref
function
result = MockTiming()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/conftest.py
testing/conftest.py
214
patch
ref
function
result.patch()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
13
parametrize
ref
function
@pytest.mark.parametrize("attribute", pytest.collect.__all__) # type: ignore
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
15
test_pytest_collect_module_deprecated
def
function
def test_pytest_collect_module_deprecated(attribute) -> None: with pytest.warns(DeprecationWarning, match=attribute): getattr(pytest.collect, attribute)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
16
warns
ref
function
with pytest.warns(DeprecationWarning, match=attribute):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
20
parametrize
ref
function
@pytest.mark.parametrize("plugin", sorted(deprecated.DEPRECATED_EXTERNAL_PLUGINS))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
22
test_external_plugins_integrated
def
function
def test_external_plugins_integrated(pytester: Pytester, plugin) -> None: pytester.syspathinsert() pytester.makepyfile(**{plugin: ""}) with pytest.warns(pytest.PytestConfigWarning): pytester.parseconfig("-p", plugin)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
23
syspathinsert
ref
function
pytester.syspathinsert()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
24
makepyfile
ref
function
pytester.makepyfile(**{plugin: ""})
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
26
warns
ref
function
with pytest.warns(pytest.PytestConfigWarning):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
27
parseconfig
ref
function
pytester.parseconfig("-p", plugin)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
30
test_fillfuncargs_is_deprecated
def
function
def test_fillfuncargs_is_deprecated() -> None: with pytest.warns( pytest.PytestDeprecationWarning, match=re.escape( "pytest._fillfuncargs() is deprecated, use " "function._request._fillfixtures() instead if you cannot avoid reaching into internals." ), ): ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
31
warns
ref
function
with pytest.warns(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
33
escape
ref
function
match=re.escape(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
38
_fillfuncargs
ref
function
pytest._fillfuncargs(mock.Mock())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
41
test_fillfixtures_is_deprecated
def
function
def test_fillfixtures_is_deprecated() -> None: import _pytest.fixtures with pytest.warns( pytest.PytestDeprecationWarning, match=re.escape( "_pytest.fixtures.fillfixtures() is deprecated, use " "function._request._fillfixtures() instead if you cannot avoid reaching into ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
44
warns
ref
function
with pytest.warns(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
46
escape
ref
function
match=re.escape(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
51
fillfixtures
ref
function
_pytest.fixtures.fillfixtures(mock.Mock())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
54
test_minus_k_dash_is_deprecated
def
function
def test_minus_k_dash_is_deprecated(pytester: Pytester) -> None: threepass = pytester.makepyfile( test_threepass=""" def test_one(): assert 1 def test_two(): assert 1 def test_three(): assert 1 """ ) result = pytester.runpytest("-k=-test_two", threepass) result.stdout...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
55
makepyfile
ref
function
threepass = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
62
runpytest
ref
function
result = pytester.runpytest("-k=-test_two", threepass)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
63
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*The `-k '-expr'` syntax*deprecated*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
66
test_minus_k_colon_is_deprecated
def
function
def test_minus_k_colon_is_deprecated(pytester: Pytester) -> None: threepass = pytester.makepyfile( test_threepass=""" def test_one(): assert 1 def test_two(): assert 1 def test_three(): assert 1 """ ) result = pytester.runpytest("-k", "test_two:", threepass) result.st...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
67
makepyfile
ref
function
threepass = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
74
runpytest
ref
function
result = pytester.runpytest("-k", "test_two:", threepass)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
75
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*The `-k 'expr:'` syntax*deprecated*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
78
test_fscollector_gethookproxy_isinitpath
def
function
def test_fscollector_gethookproxy_isinitpath(pytester: Pytester) -> None: module = pytester.getmodulecol( """ def test_foo(): pass """, withinit=_True, ) assert isinstance(module, pytest.Module) package = module.parent assert isinstance(package, pytest.Package) w...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
79
getmodulecol
ref
function
module = pytester.getmodulecol(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
89
warns
ref
function
with pytest.warns(pytest.PytestDeprecationWarning, match="gethookproxy"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
90
gethookproxy
ref
function
package.gethookproxy(pytester.path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
92
warns
ref
function
with pytest.warns(pytest.PytestDeprecationWarning, match="isinitpath"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
93
isinitpath
ref
function
package.isinitpath(pytester.path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
98
gethookproxy
ref
function
session.gethookproxy(pytester.path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
99
isinitpath
ref
function
session.isinitpath(pytester.path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
103
test_strict_option_is_deprecated
def
function
def test_strict_option_is_deprecated(pytester: Pytester) -> None: """--strict is a deprecated alias to --strict-markers (#7530).""" pytester.makepyfile( """ import pytest @pytest.mark.unknown def test_foo(): pass """ ) result = pytester.runpytest("--strict") ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
105
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
113
runpytest
ref
function
result = pytester.runpytest("--strict")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
114
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
122
test_yield_fixture_is_deprecated
def
function
def test_yield_fixture_is_deprecated() -> None: with pytest.warns(DeprecationWarning, match=r"yield_fixture is deprecated"): @pytest.yield_fixture def fix(): assert _False
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
123
warns
ref
function
with pytest.warns(DeprecationWarning, match=r"yield_fixture is deprecated"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
126
fix
def
function
def fix(): assert _False
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
130
test_private_is_deprecated
def
function
def test_private_is_deprecated() -> None: class PrivateInit: def __init__(self, foo: int, *, _ispytest: bool = _False) -> None: deprecated.check_ispytest(_ispytest) with pytest.warns( pytest.PytestDeprecationWarning, match="private pytest class or function" ): PrivateIni...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
131
PrivateInit
def
class
__init__
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
133
check_ispytest
ref
function
deprecated.check_ispytest(_ispytest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
135
warns
ref
function
with pytest.warns(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
138
PrivateInit
ref
function
PrivateInit(10)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
141
PrivateInit
ref
function
PrivateInit(10, _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
144
test_raising_unittest_skiptest_during_collection_is_deprecated
def
function
def test_raising_unittest_skiptest_during_collection_is_deprecated( pytester: Pytester,
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
147
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
153
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
154
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
161
parametrize
ref
function
@pytest.mark.parametrize("hooktype", ["hook", "ihook"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
162
test_hookproxy_warnings_for_fspath
def
function
def test_hookproxy_warnings_for_fspath(tmp_path, hooktype, request): path = legacy_path(tmp_path) PATH_WARN_MATCH = r".*path: py\.path\.local\) argument is deprecated, please use \(fspath: pathlib\.Path.*" if hooktype == "ihook": hooks = request.node.ihook else: hooks = request.config.h...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
163
legacy_path
ref
function
path = legacy_path(tmp_path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
171
warns
ref
function
with pytest.warns(PytestDeprecationWarning, match=PATH_WARN_MATCH) as r:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
173
pytest_ignore_collect
ref
function
hooks.pytest_ignore_collect(config=request.config, path=path, fspath=tmp_path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
180
pytest_ignore_collect
ref
function
hooks.pytest_ignore_collect(config=request.config, fspath=tmp_path)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/deprecated_test.py
testing/deprecated_test.py
183
raises
ref
function
with pytest.raises(ValueError, match=r"path.*fspath.*need to be equal"):