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_pytester.py
testing/test_pytester.py
492
raises
ref
function
with pytest.raises(TypeError, match="invalid type for lines2: dict"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
493
fnmatch_lines
ref
function
lm.fnmatch_lines({}) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
494
raises
ref
function
with pytest.raises(TypeError, match="invalid type for lines2: set"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
495
re_match_lines
ref
function
lm.re_match_lines(set()) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
496
raises
ref
function
with pytest.raises(TypeError, match="invalid type for lines2: dict"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
497
re_match_lines
ref
function
lm.re_match_lines({}) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
498
raises
ref
function
with pytest.raises(TypeError, match="invalid type for lines2: Source"):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
499
fnmatch_lines
ref
function
lm.fnmatch_lines(Source()) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
499
Source
ref
function
lm.fnmatch_lines(Source()) # type: ignore[arg-type]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
500
fnmatch_lines
ref
function
lm.fnmatch_lines([])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
501
fnmatch_lines
ref
function
lm.fnmatch_lines(())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
502
fnmatch_lines
ref
function
lm.fnmatch_lines("")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
503
_getlines
ref
function
assert lm._getlines({}) == {} # type: ignore[arg-type,comparison-overlap]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
504
_getlines
ref
function
assert lm._getlines(set()) == set() # type: ignore[arg-type,comparison-overlap]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
505
_getlines
ref
function
assert lm._getlines(Source()) == []
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
505
Source
ref
function
assert lm._getlines(Source()) == []
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
506
_getlines
ref
function
assert lm._getlines(Source("pass\npass")) == ["pass", "pass"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
506
Source
ref
function
assert lm._getlines(Source("pass\npass")) == ["pass", "pass"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
509
test_linematcher_match_failure
def
function
def test_linematcher_match_failure() -> None: lm = LineMatcher(["foo", "foo", "bar"]) with pytest.raises(pytest.fail.Exception) as e: lm.fnmatch_lines(["foo", "f*", "baz"]) assert e.value.msg is not None assert e.value.msg.splitlines() == [ "exact match: 'foo'", "fnmatch: 'f*'", ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
510
LineMatcher
ref
function
lm = LineMatcher(["foo", "foo", "bar"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
511
raises
ref
function
with pytest.raises(pytest.fail.Exception) as e:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
512
fnmatch_lines
ref
function
lm.fnmatch_lines(["foo", "f*", "baz"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
523
LineMatcher
ref
function
lm = LineMatcher(["foo", "foo", "bar"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
524
raises
ref
function
with pytest.raises(pytest.fail.Exception) as e:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
525
re_match_lines
ref
function
lm.re_match_lines(["foo", "^f.*", "baz"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
537
test_linematcher_consecutive
def
function
def test_linematcher_consecutive() -> None: lm = LineMatcher(["1", "", "2"]) with pytest.raises(pytest.fail.Exception) as excinfo: lm.fnmatch_lines(["1", "2"], consecutive=_True) assert str(excinfo.value).splitlines() == [ "exact match: '1'", "no consecutive match: '2'", " ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
538
LineMatcher
ref
function
lm = LineMatcher(["1", "", "2"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
539
raises
ref
function
with pytest.raises(pytest.fail.Exception) as excinfo:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
540
fnmatch_lines
ref
function
lm.fnmatch_lines(["1", "2"], consecutive=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
547
re_match_lines
ref
function
lm.re_match_lines(["1", r"\d?", "2"], consecutive=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
548
raises
ref
function
with pytest.raises(pytest.fail.Exception) as excinfo:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
549
re_match_lines
ref
function
lm.re_match_lines(["1", r"\d", "2"], consecutive=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
557
parametrize
ref
function
@pytest.mark.parametrize("function", ["no_fnmatch_line", "no_re_match_line"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
558
test_linematcher_no_matching
def
function
def test_linematcher_no_matching(function: str) -> None: if function == "no_fnmatch_line": good_pattern = "*.py OK*" bad_pattern = "*X.py OK*" else: assert function == "no_re_match_line" good_pattern = r".*py OK" bad_pattern = r".*Xpy OK" lm = LineMatcher( [ ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
567
LineMatcher
ref
function
lm = LineMatcher(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
579
raises
ref
function
with pytest.raises(pytest.fail.Exception) as e:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
581
func
ref
function
func(good_pattern)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
603
func
ref
function
func(bad_pattern) # bad pattern does not match any line: passes
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
606
test_linematcher_no_matching_after_match
def
function
def test_linematcher_no_matching_after_match() -> None: lm = LineMatcher(["1", "2", "3"]) lm.fnmatch_lines(["1", "3"]) with pytest.raises(pytest.fail.Exception) as e: lm.no_fnmatch_line("*") assert str(e.value).splitlines() == ["fnmatch: '*'", " with: '1'"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
607
LineMatcher
ref
function
lm = LineMatcher(["1", "2", "3"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
608
fnmatch_lines
ref
function
lm.fnmatch_lines(["1", "3"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
609
raises
ref
function
with pytest.raises(pytest.fail.Exception) as e:
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
610
no_fnmatch_line
ref
function
lm.no_fnmatch_line("*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
614
test_linematcher_string_api
def
function
def test_linematcher_string_api() -> None: lm = LineMatcher(["foo", "bar"]) assert str(lm) == "foo\nbar"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
615
LineMatcher
ref
function
lm = LineMatcher(["foo", "bar"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
619
test_pytest_addopts_before_pytester
def
function
def test_pytest_addopts_before_pytester(request, monkeypatch: MonkeyPatch) -> None: orig = os.environ.get("PYTEST_ADDOPTS", None) monkeypatch.setenv("PYTEST_ADDOPTS", "--orig-unused") pytester: Pytester = request.getfixturevalue("pytester") assert "PYTEST_ADDOPTS" not in os.environ pytester._finaliz...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
621
setenv
ref
function
monkeypatch.setenv("PYTEST_ADDOPTS", "--orig-unused")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
622
getfixturevalue
ref
function
pytester: Pytester = request.getfixturevalue("pytester")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
624
_finalize
ref
function
pytester._finalize()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
626
undo
ref
function
monkeypatch.undo()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
630
test_run_stdin
def
function
def test_run_stdin(pytester: Pytester) -> None: with pytest.raises(pytester.TimeoutExpired): pytester.run( sys.executable, "-c", "import sys, time; time.sleep(1); print(sys.stdin.read())", stdin=subprocess.PIPE, timeout=0.1, ) with pyt...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
631
raises
ref
function
with pytest.raises(pytester.TimeoutExpired):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
640
raises
ref
function
with pytest.raises(pytester.TimeoutExpired):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
660
test_popen_stdin_pipe
def
function
def test_popen_stdin_pipe(pytester: Pytester) -> None: proc = pytester.popen( [sys.executable, "-c", "import sys; print(sys.stdin.read())"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, ) stdin = b"input\n2ndline" stdout, stderr = proc.communicat...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
668
communicate
ref
function
stdout, stderr = proc.communicate(input=stdin)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
669
decode
ref
function
assert stdout.decode("utf8").splitlines() == ["input", "2ndline"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
674
test_popen_stdin_bytes
def
function
def test_popen_stdin_bytes(pytester: Pytester) -> None: proc = pytester.popen( [sys.executable, "-c", "import sys; print(sys.stdin.read())"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=b"input\n2ndline", ) stdout, stderr = proc.communicate() assert stdout.decod...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
681
communicate
ref
function
stdout, stderr = proc.communicate()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
682
decode
ref
function
assert stdout.decode("utf8").splitlines() == ["input", "2ndline"]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
687
test_popen_default_stdin_stderr_and_stdin_None
def
function
def test_popen_default_stdin_stderr_and_stdin_None(pytester: Pytester) -> None: # stdout, stderr default to pipes, # stdin can be None to not close the pipe, avoiding # "ValueError: flush of closed file" with `communicate()`. # # Wraps the test to make it not hang when run with "-s". p1 = pytest...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
693
makepyfile
ref
function
p1 = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
713
runpytest
ref
function
result = pytester.runpytest("-p", "pytester", str(p1))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
717
test_spawn_uses_tmphome
def
function
def test_spawn_uses_tmphome(pytester: Pytester) -> None: tmphome = str(pytester.path) assert os.environ.get("HOME") == tmphome pytester._monkeypatch.setenv("CUSTOMENV", "42") p1 = pytester.makepyfile( """ import os def test(): assert os.environ["HOME"] == {tmphome!...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
721
setenv
ref
function
pytester._monkeypatch.setenv("CUSTOMENV", "42")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
723
makepyfile
ref
function
p1 = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
734
spawn_pytest
ref
function
child = pytester.spawn_pytest(str(p1))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
736
decode
ref
function
assert child.wait() == 0, out.decode("utf8")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
739
test_run_result_repr
def
function
def test_run_result_repr() -> None: outlines = ["some", "normal", "output"] errlines = ["some", "nasty", "errors", "happened"] # known exit code r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5) assert ( repr(r) == "<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3" ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
744
RunResult
ref
function
r = pytester_mod.RunResult(1, outlines, errlines, duration=0.5)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
751
RunResult
ref
function
r = pytester_mod.RunResult(99, outlines, errlines, duration=0.5)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
758
test_pytester_outcomes_with_multiple_errors
def
function
def test_pytester_outcomes_with_multiple_errors(pytester: Pytester) -> None: p1 = pytester.makepyfile( """ import pytest @pytest.fixture def bad_fixture(): raise Exception("bad") def test_error1(bad_fixture): pass def test_error2(bad_fixture...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
759
makepyfile
ref
function
p1 = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
774
runpytest
ref
function
result = pytester.runpytest(str(p1))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
775
assert_outcomes
ref
function
result.assert_outcomes(errors=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
777
parseoutcomes
ref
function
assert result.parseoutcomes() == {"errors": 2}
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
780
test_parse_summary_line_always_plural
def
function
def test_parse_summary_line_always_plural() -> None: """Parsing summaries always returns plural nouns (#6505)""" lines = [ "some output 1", "some output 2", "======= 1 failed, 1 passed, 1 warning, 1 error in 0.13s ====", "done.", ] assert pytester_mod.RunResult.parse_summ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
788
parse_summary_nouns
ref
function
assert pytester_mod.RunResult.parse_summary_nouns(lines) == {
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
801
parse_summary_nouns
ref
function
assert pytester_mod.RunResult.parse_summary_nouns(lines) == {
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
809
test_makefile_joins_absolute_path
def
function
def test_makefile_joins_absolute_path(pytester: Pytester) -> None: absfile = pytester.path / "absfile" p1 = pytester.makepyfile(**{str(absfile): ""}) assert str(p1) == str(pytester.path / "absfile.py")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
811
makepyfile
ref
function
p1 = pytester.makepyfile(**{str(absfile): ""})
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
815
test_pytester_makefile_dot_prefixes_extension_with_warning
def
function
def test_pytester_makefile_dot_prefixes_extension_with_warning( pytester: Pytester,
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
818
raises
ref
function
with pytest.raises(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
822
makefile
ref
function
pytester.makefile("foo.bar", "")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
825
filterwarnings
ref
function
@pytest.mark.filterwarnings("default")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
826
test_pytester_assert_outcomes_warnings
def
function
def test_pytester_assert_outcomes_warnings(pytester: Pytester) -> None: pytester.makepyfile( """ import warnings def test_with_warning(): warnings.warn(UserWarning("some custom warning")) """ ) result = pytester.runpytest() result.assert_outcomes(passed=1, wa...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
827
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
835
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
836
assert_outcomes
ref
function
result.assert_outcomes(passed=1, warnings=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
839
test_pytester_outcomes_deselected
def
function
def test_pytester_outcomes_deselected(pytester: Pytester) -> None: pytester.makepyfile( """ def test_one(): pass def test_two(): pass """ ) result = pytester.runpytest("-k", "test_one") result.assert_outcomes(passed=1, deselected=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
840
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
849
runpytest
ref
function
result = pytester.runpytest("-k", "test_one")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pytester.py
testing/test_pytester.py
850
assert_outcomes
ref
function
result.assert_outcomes(passed=1, deselected=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
10
fixture
ref
function
@pytest.fixture()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
11
file_structure
def
function
def file_structure(pytester: Pytester) -> None: pytester.makepyfile( test_foo=""" from foo import foo def test_foo(): assert foo() == 1 """ ) pytester.makepyfile( test_bar=""" from bar import bar def test_bar(): assert bar() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
12
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
21
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
30
mkdir
ref
function
foo_py = pytester.mkdir("sub") / "foo.py"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
37
write_text
ref
function
foo_py.write_text(content, encoding="utf-8")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
39
mkdir
ref
function
bar_py = pytester.mkdir("sub2") / "bar.py"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_pythonpath.py
testing/test_pythonpath.py
46
write_text
ref
function
bar_py.write_text(content, encoding="utf-8")