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_terminal.py
testing/test_terminal.py
2,421
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,422
format_for_fnmatch
ref
function
color_mapping.format_for_fnmatch(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,431
test_code_highlight_invalid_theme
def
function
def test_code_highlight_invalid_theme( self, pytester: Pytester, color_mapping, monkeypatch: MonkeyPatch ) -> None: pytester.makepyfile( """ def test_foo(): assert 1 == 10 """ ) monkeypatch.setenv("PYTEST_THEME", "invalid") ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,434
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,440
setenv
ref
function
monkeypatch.setenv("PYTEST_THEME", "invalid")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,441
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--color=yes")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,442
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,447
test_code_highlight_invalid_theme_mode
def
function
def test_code_highlight_invalid_theme_mode( self, pytester: Pytester, color_mapping, monkeypatch: MonkeyPatch ) -> None: pytester.makepyfile( """ def test_foo(): assert 1 == 10 """ ) monkeypatch.setenv("PYTEST_THEME_MODE", "invalid"...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,450
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,456
setenv
ref
function
monkeypatch.setenv("PYTEST_THEME_MODE", "invalid")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,457
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("--color=yes")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,458
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,464
test_raw_skip_reason_skipped
def
function
def test_raw_skip_reason_skipped() -> None: report = SimpleNamespace() report.skipped = _True report.longrepr = ("xyz", 3, "Skipped: Just so") reason = _get_raw_skip_reason(cast(TestReport, report)) assert reason == "Just so"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,469
_get_raw_skip_reason
ref
function
reason = _get_raw_skip_reason(cast(TestReport, report))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,473
test_raw_skip_reason_xfail
def
function
def test_raw_skip_reason_xfail() -> None: report = SimpleNamespace() report.wasxfail = "reason: To everything there is a season" reason = _get_raw_skip_reason(cast(TestReport, report)) assert reason == "To everything there is a season"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,477
_get_raw_skip_reason
ref
function
reason = _get_raw_skip_reason(cast(TestReport, report))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,481
test_format_trimmed
def
function
def test_format_trimmed() -> None: msg = "unconditional skip" assert _format_trimmed(" ({}) ", msg, len(msg) + 4) == " (unconditional skip) " assert _format_trimmed(" ({}) ", msg, len(msg) + 3) == " (unconditional ...) "
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,484
_format_trimmed
ref
function
assert _format_trimmed(" ({}) ", msg, len(msg) + 4) == " (unconditional skip) "
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_terminal.py
testing/test_terminal.py
2,485
_format_trimmed
ref
function
assert _format_trimmed(" ({}) ", msg, len(msg) + 3) == " (unconditional ...) "
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
7
skip
ref
function
pytest.skip("threadexception plugin needs Python>=3.8", allow_module_level=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
10
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::pytest.PytestUnhandledThreadExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
11
test_unhandled_thread_exception
def
function
def test_unhandled_thread_exception(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" import threading def test_it(): def oops(): raise ValueError("Oops") t = threading.Thread(target=oops, name="MyThread") t.start() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
12
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
27
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
29
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 2, "warnings": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
30
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
44
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::pytest.PytestUnhandledThreadExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
45
test_unhandled_thread_exception_in_setup
def
function
def test_unhandled_thread_exception_in_setup(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" import threading import pytest @pytest.fixture def threadexc(): def oops(): raise ValueError("Oops") t = threading.Thread(target...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
46
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
63
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
65
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 2, "warnings": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
66
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
80
filterwarnings
ref
function
@pytest.mark.filterwarnings("default::pytest.PytestUnhandledThreadExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
81
test_unhandled_thread_exception_in_teardown
def
function
def test_unhandled_thread_exception_in_teardown(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" import threading import pytest @pytest.fixture def threadexc(): def oops(): raise ValueError("Oops") yield t = th...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
82
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
100
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
102
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 2, "warnings": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
103
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
117
filterwarnings
ref
function
@pytest.mark.filterwarnings("error::pytest.PytestUnhandledThreadExceptionWarning")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
118
test_unhandled_thread_exception_warning_error
def
function
def test_unhandled_thread_exception_warning_error(pytester: Pytester) -> None: pytester.makepyfile( test_it=""" import threading import pytest def test_it(): def oops(): raise ValueError("Oops") t = threading.Thread(target=oops, name="MyThread...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
119
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
134
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_threadexception.py
testing/test_threadexception.py
136
parseoutcomes
ref
function
assert result.parseoutcomes() == {"passed": 1, "failed": 1}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
27
test_tmp_path_fixture
def
function
def test_tmp_path_fixture(pytester: Pytester) -> None: p = pytester.copy_example("tmpdir/tmp_path_fixture.py") results = pytester.runpytest(p) results.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
28
copy_example
ref
function
p = pytester.copy_example("tmpdir/tmp_path_fixture.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
29
runpytest
ref
function
results = pytester.runpytest(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
30
fnmatch_lines
ref
function
results.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
34
FakeConfig
def
class
trace get option
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
38
trace
def
function
def trace(self): return self def get(self, key): return lambda *k: None @property def option(self): return self
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
45
option
def
function
def option(self): return self
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
49
TestTmpPathHandler
def
class
test_mktemp test_tmppath_relative_basetemp_absolute
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
50
test_mktemp
def
function
def test_mktemp(self, tmp_path): config = cast(Config, FakeConfig(tmp_path)) t = TempPathFactory.from_config(config, _ispytest=_True) tmp = t.mktemp("world") assert str(tmp.relative_to(t.getbasetemp())) == "world0" tmp = t.mktemp("this") assert str(tmp.relative_to(t.g...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
51
FakeConfig
ref
function
config = cast(Config, FakeConfig(tmp_path))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
52
from_config
ref
function
t = TempPathFactory.from_config(config, _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
53
mktemp
ref
function
tmp = t.mktemp("world")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
54
getbasetemp
ref
function
assert str(tmp.relative_to(t.getbasetemp())) == "world0"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
55
mktemp
ref
function
tmp = t.mktemp("this")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
56
getbasetemp
ref
function
assert str(tmp.relative_to(t.getbasetemp())).startswith("this")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
57
mktemp
ref
function
tmp2 = t.mktemp("this")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
58
getbasetemp
ref
function
assert str(tmp2.relative_to(t.getbasetemp())).startswith("this")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
61
test_tmppath_relative_basetemp_absolute
def
function
def test_tmppath_relative_basetemp_absolute(self, tmp_path, monkeypatch): """#4425""" monkeypatch.chdir(tmp_path) config = cast(Config, FakeConfig("hello")) t = TempPathFactory.from_config(config, _ispytest=_True) assert t.getbasetemp().resolve() == (tmp_path / "hello").resol...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
64
FakeConfig
ref
function
config = cast(Config, FakeConfig("hello"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
65
from_config
ref
function
t = TempPathFactory.from_config(config, _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
66
getbasetemp
ref
function
assert t.getbasetemp().resolve() == (tmp_path / "hello").resolve()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
69
TestConfigTmpPath
def
class
test_getbasetemp_custom_removes_old
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
70
test_getbasetemp_custom_removes_old
def
function
def test_getbasetemp_custom_removes_old(self, pytester: Pytester) -> None: mytemp = pytester.path.joinpath("xyz") p = pytester.makepyfile( """ def test_1(tmp_path): pass """ ) pytester.runpytest(p, "--basetemp=%s" % mytemp) asse...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
72
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
78
runpytest
ref
function
pytester.runpytest(p, "--basetemp=%s" % mytemp)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
82
runpytest
ref
function
pytester.runpytest(p, "--basetemp=%s" % mytemp)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
99
parametrize
ref
function
@pytest.mark.parametrize("basename, is_ok", testdata)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
100
test_mktemp
def
function
def test_mktemp(pytester: Pytester, basename: str, is_ok: bool) -> None: mytemp = pytester.mkdir("mytemp") p = pytester.makepyfile( """ def test_abs_path(tmp_path_factory): tmp_path_factory.mktemp('{}', numbered=_False) """.format( basename ) ) re...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
102
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
111
runpytest
ref
function
result = pytester.runpytest(p, "--basetemp=%s" % mytemp)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
117
fnmatch_lines
ref
function
result.stdout.fnmatch_lines("*ValueError*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
120
test_tmp_path_always_is_realpath
def
function
def test_tmp_path_always_is_realpath(pytester: Pytester, monkeypatch) -> None: # the reason why tmp_path should be a realpath is that # when you cd to it and do "os.getcwd()" you will anyway # get the realpath. Using the symlinked path can thus # easily result in path-inequality # XXX if that prove...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
129
attempt_symlink_to
ref
function
attempt_symlink_to(linktemp, str(realtemp))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
130
setenv
ref
function
monkeypatch.setenv("PYTEST_DEBUG_TEMPROOT", str(linktemp))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
131
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
137
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
138
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
141
test_tmp_path_too_long_on_parametrization
def
function
def test_tmp_path_too_long_on_parametrization(pytester: Pytester) -> None: pytester.makepyfile( """ import pytest @pytest.mark.parametrize("arg", ["1"*1000]) def test_some(arg, tmp_path): tmp_path.joinpath("hello").touch() """ ) reprec = pytester.inline_run() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
142
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
150
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
151
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
154
test_tmp_path_factory
def
function
def test_tmp_path_factory(pytester: Pytester) -> None: pytester.makepyfile( """ import pytest @pytest.fixture(scope='session') def session_dir(tmp_path_factory): return tmp_path_factory.mktemp('data', numbered=_False) def test_some(session_dir): assert...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
155
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
165
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
166
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
169
test_tmp_path_fallback_tox_env
def
function
def test_tmp_path_fallback_tox_env(pytester: Pytester, monkeypatch) -> None: """Test that tmp_path works even if environment variables required by getpass module are missing (#1010). """ monkeypatch.delenv("USER", raising=_False) monkeypatch.delenv("USERNAME", raising=_False) pytester.makepyfile...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
173
delenv
ref
function
monkeypatch.delenv("USER", raising=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
174
delenv
ref
function
monkeypatch.delenv("USERNAME", raising=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
175
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
181
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
182
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
186
break_getuser
def
function
def break_getuser(monkeypatch): monkeypatch.setattr("os.getuid", lambda: -1) # taken from python 2.7/3.4 for envvar in ("LOGNAME", "USER", "LNAME", "USERNAME"): monkeypatch.delenv(envvar, raising=_False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
190
delenv
ref
function
monkeypatch.delenv(envvar, raising=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
193
usefixtures
ref
function
@pytest.mark.usefixtures("break_getuser")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
194
skipif
ref
function
@pytest.mark.skipif(sys.platform.startswith("win"), reason="no os.getuid on windows")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
195
test_tmp_path_fallback_uid_not_found
def
function
def test_tmp_path_fallback_uid_not_found(pytester: Pytester) -> None: """Test that tmp_path works even if the current process's user id does not correspond to a valid user. """ pytester.makepyfile( """ def test_some(tmp_path): assert tmp_path.is_dir() """ ) repre...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_tmpdir.py
testing/test_tmpdir.py
200
makepyfile
ref
function
pytester.makepyfile(