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/python/raises.py
testing/python/raises.py
282
raises
ref
function
with pytest.raises("hello"): # type: ignore[call-overload]
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py
testing/python/raises.py
286
NotAnException
def
class
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py
testing/python/raises.py
289
raises
ref
function
with pytest.raises(TypeError) as excinfo:
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py
testing/python/raises.py
290
raises
ref
function
with pytest.raises(NotAnException): # type: ignore[type-var]
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py
testing/python/raises.py
294
raises
ref
function
with pytest.raises(TypeError) as excinfo:
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/raises.py
testing/python/raises.py
295
raises
ref
function
with pytest.raises(("hello", NotAnException)): # type: ignore[arg-type]
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
3
test_no_items_should_not_show_output
def
function
def test_no_items_should_not_show_output(pytester: Pytester) -> None: result = pytester.runpytest("--fixtures-per-test") result.stdout.no_fnmatch_line("*fixtures used by*") assert result.ret == 0
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
4
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
5
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*fixtures used by*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
9
test_fixtures_in_module
def
function
def test_fixtures_in_module(pytester: Pytester) -> None: p = pytester.makepyfile( ''' import pytest @pytest.fixture def _arg0(): """hidden arg0 fixture""" @pytest.fixture def arg1(): """arg1 docstring""" def test_arg1(arg1): ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
10
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
24
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test", p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
27
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
35
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*_arg0*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
38
test_fixtures_in_conftest
def
function
def test_fixtures_in_conftest(pytester: Pytester) -> None: pytester.makeconftest( ''' import pytest @pytest.fixture def arg1(): """arg1 docstring""" @pytest.fixture def arg2(): """arg2 docstring""" @pytest.fixture def arg3(arg1,...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
39
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
55
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
63
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test", p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
66
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
84
test_should_show_fixtures_used_by_test
def
function
def test_should_show_fixtures_used_by_test(pytester: Pytester) -> None: pytester.makeconftest( ''' import pytest @pytest.fixture def arg1(): """arg1 from conftest""" @pytest.fixture def arg2(): """arg2 from conftest""" ''' ) p = pyt...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
85
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
96
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
106
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test", p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
109
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
121
test_verbose_include_private_fixtures_and_loc
def
function
def test_verbose_include_private_fixtures_and_loc(pytester: Pytester) -> None: pytester.makeconftest( ''' import pytest @pytest.fixture def _arg1(): """_arg1 from conftest""" @pytest.fixture def arg2(_arg1): """arg2 from conftest""" ''' ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
122
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
133
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
143
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test", "-v", p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
146
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
160
test_doctest_items
def
function
def test_doctest_items(pytester: Pytester) -> None: pytester.makepyfile( ''' def foo(): """ >>> 1 + 1 2 """ ''' ) pytester.maketxtfile( """ >>> 1 + 1 2 """ ) result = pytester.runpytest( "--fixtur...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
161
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
170
maketxtfile
ref
function
pytester.maketxtfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
176
runpytest
ref
function
result = pytester.runpytest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
181
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*collected 2 items*"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
184
test_multiline_docstring_in_module
def
function
def test_multiline_docstring_in_module(pytester: Pytester) -> None: p = pytester.makepyfile( ''' import pytest @pytest.fixture def arg1(): """Docstring content that spans across multiple lines, through second line, and through third line. ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
185
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
203
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test", p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
206
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
218
test_verbose_include_multiline_docstring
def
function
def test_verbose_include_multiline_docstring(pytester: Pytester) -> None: p = pytester.makepyfile( ''' import pytest @pytest.fixture def arg1(): """Docstring content that spans across multiple lines, through second line, and through third line. ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
219
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
237
runpytest
ref
function
result = pytester.runpytest("--fixtures-per-test", "-v", p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/python/show_fixtures_per_test.py
testing/python/show_fixtures_per_test.py
240
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
10
equal_with_bash
def
function
def equal_with_bash(prefix, ffc, fc, out=None): res = ffc(prefix) res_bash = set(fc(prefix)) retval = set(res) == res_bash if out: out.write(f"equal_with_bash({prefix}) {retval} {res}\n") if not retval: out.write(" python - bash: %s\n" % (set(res) - res_bash)) out...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
11
ffc
ref
function
res = ffc(prefix)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
12
fc
ref
function
res_bash = set(fc(prefix))
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
15
write
ref
function
out.write(f"equal_with_bash({prefix}) {retval} {res}\n")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
17
write
ref
function
out.write(" python - bash: %s\n" % (set(res) - res_bash))
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
18
write
ref
function
out.write(" bash - python: %s\n" % (res_bash - set(res)))
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
27
_wrapcall
def
function
def _wrapcall(*args, **kargs): try: return subprocess.check_output(*args, **kargs).decode().splitlines() except subprocess.CalledProcessError: return []
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
29
decode
ref
function
return subprocess.check_output(*args, **kargs).decode().splitlines()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
34
FilesCompleter
def
class
__init__ __call__
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
45
__call__
def
function
def __call__(self, prefix, **kwargs): completion = [] if self.allowednames: if self.directories: files = _wrapcall(["bash", "-c", f"compgen -A directory -- '{prefix}'"]) completion += [f + "/" for f in files] for x in self.allowednames: ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
49
_wrapcall
ref
function
files = _wrapcall(["bash", "-c", f"compgen -A directory -- '{prefix}'"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
52
_wrapcall
ref
function
completion += _wrapcall(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
56
_wrapcall
ref
function
completion += _wrapcall(["bash", "-c", f"compgen -A file -- '{prefix}'"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
58
_wrapcall
ref
function
anticomp = _wrapcall(["bash", "-c", f"compgen -A directory -- '{prefix}'"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
67
TestArgComplete
def
class
test_compare_with_compgen test_remove_dir_prefix
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
68
skipif
ref
function
@pytest.mark.skipif("sys.platform in ('win32', 'darwin')")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
69
test_compare_with_compgen
def
function
def test_compare_with_compgen( self, tmp_path: Path, monkeypatch: MonkeyPatch ) -> None: from _pytest._argcomplete import FastFilesCompleter ffc = FastFilesCompleter() fc = FilesCompleter() monkeypatch.chdir(tmp_path) assert equal_with_bash("", ffc, fc, out=sys...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
74
FastFilesCompleter
ref
function
ffc = FastFilesCompleter()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
75
FilesCompleter
ref
function
fc = FilesCompleter()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
77
chdir
ref
function
monkeypatch.chdir(tmp_path)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
79
equal_with_bash
ref
function
assert equal_with_bash("", ffc, fc, out=sys.stdout)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
84
equal_with_bash
ref
function
assert equal_with_bash(x, ffc, fc, out=sys.stdout)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
86
skipif
ref
function
@pytest.mark.skipif("sys.platform in ('win32', 'darwin')")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
87
test_remove_dir_prefix
def
function
def test_remove_dir_prefix(self): """This is not compatible with compgen but it is with bash itself: ls /usr/<TAB>.""" from _pytest._argcomplete import FastFilesCompleter ffc = FastFilesCompleter() fc = FilesCompleter() for x in "/usr/".split(): assert not equal_...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
91
FastFilesCompleter
ref
function
ffc = FastFilesCompleter()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
92
FilesCompleter
ref
function
fc = FilesCompleter()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_argcomplete.py
testing/test_argcomplete.py
94
equal_with_bash
ref
function
assert not equal_with_bash(x, ffc, fc, out=sys.stdout)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
18
mock_config
def
function
def mock_config(verbose=0): class Config: def getoption(self, name): if name == "verbose": return verbose raise KeyError("Not mocked out: %s" % name) return Config()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
19
Config
def
class
getoption
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
20
getoption
def
function
def getoption(self, name): if name == "verbose": return verbose raise KeyError("Not mocked out: %s" % name) return Config()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
25
Config
ref
function
return Config()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
28
TestImportHookInstallation
def
class
test_conftest_assertion_rewrite test_rewrite_assertions_pytester_plugin test_pytest_plugins_rewrite test_pytest_plugins_rewrite_module_names test_pytest_plugins_rewrite_module_names_correctly test_installed_plugin_rewrite test_rewrite_ast test_register_assert_rewrite_checks_types
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
29
parametrize
ref
function
@pytest.mark.parametrize("initial_conftest", [True, False])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
30
parametrize
ref
function
@pytest.mark.parametrize("mode", ["plain", "rewrite"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
31
test_conftest_assertion_rewrite
def
function
def test_conftest_assertion_rewrite( self, pytester: Pytester, initial_conftest, mode ) -> None: """Test that conftest files are using assertion rewrite on import (#1619).""" pytester.mkdir("foo") pytester.mkdir("foo/tests") conftest_path = "conftest.py" if initial_confte...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
35
mkdir
ref
function
pytester.mkdir("foo")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
36
mkdir
ref
function
pytester.mkdir("foo/tests")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
52
makepyfile
ref
function
pytester.makepyfile(**contents)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
53
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--assert=%s" % mode)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
60
fnmatch_lines
ref
function
result.stdout.fnmatch_lines([expected])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
62
test_rewrite_assertions_pytester_plugin
def
function
def test_rewrite_assertions_pytester_plugin(self, pytester: Pytester) -> None: """ Assertions in the pytester plugin must also benefit from assertion rewriting (#1920). """ pytester.makepyfile( """ pytest_plugins = ['pytester'] def test_dum...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
67
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
76
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
77
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
88
fnmatch_lines_random
ref
function
result.stdout.fnmatch_lines_random(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
95
parametrize
ref
function
@pytest.mark.parametrize("mode", ["plain", "rewrite"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
96
test_pytest_plugins_rewrite
def
function
def test_pytest_plugins_rewrite(self, pytester: Pytester, mode) -> None: contents = { "conftest.py": """ pytest_plugins = ['ham'] """, "ham.py": """ import pytest @pytest.fixture def check_first(): ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
114
makepyfile
ref
function
pytester.makepyfile(**contents)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
115
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--assert=%s" % mode)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
122
fnmatch_lines
ref
function
result.stdout.fnmatch_lines([expected])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
124
parametrize
ref
function
@pytest.mark.parametrize("mode", ["str", "list"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
125
test_pytest_plugins_rewrite_module_names
def
function
def test_pytest_plugins_rewrite_module_names( self, pytester: Pytester, mode ) -> None: """Test that pluginmanager correct marks pytest_plugins variables for assertion rewriting if they are defined as plain strings or list of strings (#1888). """ plugins = '"ham"'...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
147
makepyfile
ref
function
pytester.makepyfile(**contents)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
148
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--assert=rewrite")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
151
test_pytest_plugins_rewrite_module_names_correctly
def
function
def test_pytest_plugins_rewrite_module_names_correctly( self, pytester: Pytester ) -> None: """Test that we match files correctly when they are marked for rewriting (#2939).""" contents = { "conftest.py": """\ pytest_plugins = "ham" """, ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
167
makepyfile
ref
function
pytester.makepyfile(**contents)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
168
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--assert=rewrite")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_assertion.py
testing/test_assertion.py
171
parametrize
ref
function
@pytest.mark.parametrize("mode", ["plain", "rewrite"])