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/test_pytester.py | testing/test_pytester.py | 366 | test_preserve_container | def | function | def test_preserve_container(self, monkeypatch: MonkeyPatch) -> None:
original = dict(sys.modules)
assert self.key not in original
replacement = dict(sys.modules)
replacement[self.key] = ModuleType("life of brian")
snapshot = SysModulesSnapshot()
monkeypatch.setattr(sy... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 371 | SysModulesSnapshot | ref | function | snapshot = SysModulesSnapshot()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 373 | restore | ref | function | snapshot.restore()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 378 | parametrize | ref | function | @pytest.mark.parametrize("path_type", ("path", "meta_path"))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 379 | TestSysPathsSnapshot | def | class | path test_restore test_preserve_container |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 383 | path | def | function | def path(n: int) -> str:
return "my-dirty-little-secret-" + str(n)
def test_restore(self, monkeypatch: MonkeyPatch, path_type) -> None:
other_path_type = self.other_path[path_type]
for i in range(10):
assert self.path(i) not in getattr(sys, path_type)
sys_path = [sel... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 386 | test_restore | def | function | def test_restore(self, monkeypatch: MonkeyPatch, path_type) -> None:
other_path_type = self.other_path[path_type]
for i in range(10):
assert self.path(i) not in getattr(sys, path_type)
sys_path = [self.path(i) for i in range(6)]
monkeypatch.setattr(sys, path_type, sys_pat... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 389 | path | ref | function | assert self.path(i) not in getattr(sys, path_type)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 390 | path | ref | function | sys_path = [self.path(i) for i in range(6)]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 394 | SysPathsSnapshot | ref | function | snapshot = SysPathsSnapshot()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 396 | path | ref | function | assert sys_path == [self.path(x) for x in transformation["source"]]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 397 | path | ref | function | sys_path[1] = self.path(6)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 398 | path | ref | function | sys_path[3] = self.path(7)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 399 | path | ref | function | sys_path.append(self.path(8))
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 401 | path | ref | function | sys_path[3:3] = [self.path(9)]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 403 | path | ref | function | assert sys_path == [self.path(x) for x in transformation["target"]]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 404 | restore | ref | function | snapshot.restore()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 409 | test_preserve_container | def | function | def test_preserve_container(self, monkeypatch: MonkeyPatch, path_type) -> None:
other_path_type = self.other_path[path_type]
original_data = list(getattr(sys, path_type))
original_other = getattr(sys, other_path_type)
original_other_data = list(original_other)
new: List[objec... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 415 | SysPathsSnapshot | ref | function | snapshot = SysPathsSnapshot()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 417 | restore | ref | function | snapshot.restore()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 424 | test_pytester_subprocess | def | function | def test_pytester_subprocess(pytester: Pytester) -> None:
testfile = pytester.makepyfile("def test_one(): pass")
assert pytester.runpytest_subprocess(testfile).ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 425 | makepyfile | ref | function | testfile = pytester.makepyfile("def test_one(): pass")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 426 | runpytest_subprocess | ref | function | assert pytester.runpytest_subprocess(testfile).ret == 0
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 429 | test_pytester_subprocess_via_runpytest_arg | def | function | def test_pytester_subprocess_via_runpytest_arg(pytester: Pytester) -> None:
testfile = pytester.makepyfile(
"""
def test_pytester_subprocess(pytester):
import os
testfile = pytester.makepyfile(
\"""
import os
def test_one():
... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 430 | makepyfile | ref | function | testfile = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 444 | runpytest_inprocess | ref | function | result = pytester.runpytest_inprocess(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 450 | test_unicode_args | def | function | def test_unicode_args(pytester: Pytester) -> None:
result = pytester.runpytest("-k", "אבג")
assert result.ret == ExitCode.NO_TESTS_COLLECTED
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 451 | runpytest | ref | function | result = pytester.runpytest("-k", "אבג")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 455 | test_pytester_run_no_timeout | def | function | def test_pytester_run_no_timeout(pytester: Pytester) -> None:
testfile = pytester.makepyfile("def test_no_timeout(): pass")
assert pytester.runpytest_subprocess(testfile).ret == ExitCode.OK
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 456 | makepyfile | ref | function | testfile = pytester.makepyfile("def test_no_timeout(): pass")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 457 | runpytest_subprocess | ref | function | assert pytester.runpytest_subprocess(testfile).ret == ExitCode.OK
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 460 | test_pytester_run_with_timeout | def | function | def test_pytester_run_with_timeout(pytester: Pytester) -> None:
testfile = pytester.makepyfile("def test_no_timeout(): pass")
timeout = 120
start = time.time()
result = pytester.runpytest_subprocess(testfile, timeout=timeout)
end = time.time()
duration = end - start
assert result.ret == E... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 461 | makepyfile | ref | function | testfile = pytester.makepyfile("def test_no_timeout(): pass")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 466 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess(testfile, timeout=timeout)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 474 | test_pytester_run_timeout_expires | def | function | def test_pytester_run_timeout_expires(pytester: Pytester) -> None:
testfile = pytester.makepyfile(
"""
import time
def test_timeout():
time.sleep(10)"""
)
with pytest.raises(pytester.TimeoutExpired):
pytester.runpytest_subprocess(testfile, timeout=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 475 | makepyfile | ref | function | testfile = pytester.makepyfile(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 482 | raises | ref | function | with pytest.raises(pytester.TimeoutExpired):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 483 | runpytest_subprocess | ref | function | pytester.runpytest_subprocess(testfile, timeout=1)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 486 | test_linematcher_with_nonlist | def | function | def test_linematcher_with_nonlist() -> None:
"""Test LineMatcher with regard to passing in a set (accidentally)."""
from _pytest._code.source import Source
lm = LineMatcher([])
with pytest.raises(TypeError, match="invalid type for lines2: set"):
lm.fnmatch_lines(set()) # type: ignore[arg-type]... |
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 490 | LineMatcher | ref | function | lm = LineMatcher([])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 491 | raises | ref | function | with pytest.raises(TypeError, match="invalid type for lines2: set"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 492 | fnmatch_lines | ref | function | lm.fnmatch_lines(set()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 493 | raises | ref | function | with pytest.raises(TypeError, match="invalid type for lines2: dict"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 494 | fnmatch_lines | ref | function | lm.fnmatch_lines({}) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 495 | raises | ref | function | with pytest.raises(TypeError, match="invalid type for lines2: set"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 496 | re_match_lines | ref | function | lm.re_match_lines(set()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 497 | raises | ref | function | with pytest.raises(TypeError, match="invalid type for lines2: dict"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 498 | re_match_lines | ref | function | lm.re_match_lines({}) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 499 | raises | ref | function | with pytest.raises(TypeError, match="invalid type for lines2: Source"):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 500 | fnmatch_lines | ref | function | lm.fnmatch_lines(Source()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 500 | Source | ref | function | lm.fnmatch_lines(Source()) # type: ignore[arg-type]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 501 | fnmatch_lines | ref | function | lm.fnmatch_lines([])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 502 | fnmatch_lines | ref | function | lm.fnmatch_lines(())
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 503 | fnmatch_lines | ref | function | lm.fnmatch_lines("")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 504 | _getlines | ref | function | assert lm._getlines({}) == {} # type: ignore[arg-type,comparison-overlap]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 505 | _getlines | ref | function | assert lm._getlines(set()) == set() # type: ignore[arg-type,comparison-overlap]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 506 | _getlines | ref | function | assert lm._getlines(Source()) == []
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 506 | Source | ref | function | assert lm._getlines(Source()) == []
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 507 | _getlines | ref | function | assert lm._getlines(Source("pass\npass")) == ["pass", "pass"]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 507 | Source | ref | function | assert lm._getlines(Source("pass\npass")) == ["pass", "pass"]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 510 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 511 | LineMatcher | ref | function | lm = LineMatcher(["foo", "foo", "bar"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 512 | raises | ref | function | with pytest.raises(pytest.fail.Exception) as e:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 513 | fnmatch_lines | ref | function | lm.fnmatch_lines(["foo", "f*", "baz"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 524 | LineMatcher | ref | function | lm = LineMatcher(["foo", "foo", "bar"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 525 | raises | ref | function | with pytest.raises(pytest.fail.Exception) as e:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 526 | re_match_lines | ref | function | lm.re_match_lines(["foo", "^f.*", "baz"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 538 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 539 | LineMatcher | ref | function | lm = LineMatcher(["1", "", "2"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 540 | raises | ref | function | with pytest.raises(pytest.fail.Exception) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 541 | fnmatch_lines | ref | function | lm.fnmatch_lines(["1", "2"], consecutive=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 548 | re_match_lines | ref | function | lm.re_match_lines(["1", r"\d?", "2"], consecutive=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 549 | raises | ref | function | with pytest.raises(pytest.fail.Exception) as excinfo:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 550 | re_match_lines | ref | function | lm.re_match_lines(["1", r"\d", "2"], consecutive=True)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 558 | parametrize | ref | function | @pytest.mark.parametrize("function", ["no_fnmatch_line", "no_re_match_line"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 559 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 568 | LineMatcher | ref | function | lm = LineMatcher(
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 580 | raises | ref | function | with pytest.raises(pytest.fail.Exception) as e:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 582 | func | ref | function | func(good_pattern)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 604 | func | ref | function | func(bad_pattern) # bad pattern does not match any line: passes
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 607 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 608 | LineMatcher | ref | function | lm = LineMatcher(["1", "2", "3"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 609 | fnmatch_lines | ref | function | lm.fnmatch_lines(["1", "3"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 610 | raises | ref | function | with pytest.raises(pytest.fail.Exception) as e:
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 611 | no_fnmatch_line | ref | function | lm.no_fnmatch_line("*")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 615 | test_linematcher_string_api | def | function | def test_linematcher_string_api() -> None:
lm = LineMatcher(["foo", "bar"])
assert str(lm) == "foo\nbar"
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 616 | LineMatcher | ref | function | lm = LineMatcher(["foo", "bar"])
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 620 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 622 | setenv | ref | function | monkeypatch.setenv("PYTEST_ADDOPTS", "--orig-unused")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 623 | getfixturevalue | ref | function | pytester: Pytester = request.getfixturevalue("pytester")
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 625 | _finalize | ref | function | pytester._finalize()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 627 | undo | ref | function | monkeypatch.undo()
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 631 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 632 | raises | ref | function | with pytest.raises(pytester.TimeoutExpired):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 641 | raises | ref | function | with pytest.raises(pytester.TimeoutExpired):
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 661 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 669 | communicate | ref | function | stdout, stderr = proc.communicate(input=stdin)
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 670 | decode | ref | function | assert stdout.decode("utf8").splitlines() == ["input", "2ndline"]
|
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 675 | 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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_pytester.py | testing/test_pytester.py | 682 | communicate | ref | function | stdout, stderr = proc.communicate()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.