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_capture.py | testing/test_capture.py | 964 | start | ref | function | cap.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 966 | snap | ref | function | s = cap.snap()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 967 | done | ref | function | cap.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 970 | test_simple_many | def | function | def test_simple_many(self, tmpfile: BinaryIO) -> None:
for i in range(10):
self.test_simple(tmpfile)
def test_simple_many_check_open_files(self, pytester: Pytester) -> None:
with lsof_check():
with pytester.makepyfile("").open("wb+") as tmpfile:
self.test... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 972 | test_simple | ref | function | self.test_simple(tmpfile)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 974 | test_simple_many_check_open_files | def | function | def test_simple_many_check_open_files(self, pytester: Pytester) -> None:
with lsof_check():
with pytester.makepyfile("").open("wb+") as tmpfile:
self.test_simple_many(tmpfile)
def test_simple_fail_second_start(self, tmpfile: BinaryIO) -> None:
fd = tmpfile.fileno()
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 975 | lsof_check | ref | function | with lsof_check():
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 976 | makepyfile | ref | function | with pytester.makepyfile("").open("wb+") as tmpfile:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 977 | test_simple_many | ref | function | self.test_simple_many(tmpfile)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 979 | test_simple_fail_second_start | def | function | def test_simple_fail_second_start(self, tmpfile: BinaryIO) -> None:
fd = tmpfile.fileno()
cap = capture.FDCapture(fd)
cap.done()
pytest.raises(AssertionError, cap.start)
def test_stderr(self) -> None:
cap = capture.FDCapture(2)
cap.start()
print("hello", ... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 981 | FDCapture | ref | function | cap = capture.FDCapture(fd)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 982 | done | ref | function | cap.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 983 | raises | ref | function | pytest.raises(AssertionError, cap.start)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 985 | test_stderr | def | function | def test_stderr(self) -> None:
cap = capture.FDCapture(2)
cap.start()
print("hello", file=sys.stderr)
s = cap.snap()
cap.done()
assert s == "hello\n"
def test_stdin(self) -> None:
cap = capture.FDCapture(0)
cap.start()
x = os.read(0, 100).... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 986 | FDCapture | ref | function | cap = capture.FDCapture(2)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 987 | start | ref | function | cap.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 989 | snap | ref | function | s = cap.snap()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 990 | done | ref | function | cap.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 993 | test_stdin | def | function | def test_stdin(self) -> None:
cap = capture.FDCapture(0)
cap.start()
x = os.read(0, 100).strip()
cap.done()
assert x == b""
def test_writeorg(self, tmpfile: BinaryIO) -> None:
data1, data2 = b"foo", b"bar"
cap = capture.FDCapture(tmpfile.fileno())
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 994 | FDCapture | ref | function | cap = capture.FDCapture(0)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 995 | start | ref | function | cap.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 997 | done | ref | function | cap.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,000 | test_writeorg | def | function | def test_writeorg(self, tmpfile: BinaryIO) -> None:
data1, data2 = b"foo", b"bar"
cap = capture.FDCapture(tmpfile.fileno())
cap.start()
tmpfile.write(data1)
tmpfile.flush()
cap.writeorg(data2.decode("ascii"))
scap = cap.snap()
cap.done()
assert... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,002 | FDCapture | ref | function | cap = capture.FDCapture(tmpfile.fileno())
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,003 | start | ref | function | cap.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,006 | writeorg | ref | function | cap.writeorg(data2.decode("ascii"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,006 | decode | ref | function | cap.writeorg(data2.decode("ascii"))
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,007 | snap | ref | function | scap = cap.snap()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,008 | done | ref | function | cap.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,009 | decode | ref | function | assert scap == data1.decode("ascii")
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,014 | test_simple_resume_suspend | def | function | def test_simple_resume_suspend(self) -> None:
with saved_fd(1):
cap = capture.FDCapture(1)
cap.start()
data = b"hello"
os.write(1, data)
sys.stdout.write("whatever")
s = cap.snap()
assert s == "hellowhatever"
cap... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,015 | saved_fd | ref | function | with saved_fd(1):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,016 | FDCapture | ref | function | cap = capture.FDCapture(1)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,017 | start | ref | function | cap.start()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,021 | snap | ref | function | s = cap.snap()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,023 | suspend | ref | function | cap.suspend()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,026 | snap | ref | function | assert not cap.snap()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,027 | resume | ref | function | cap.resume()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,030 | snap | ref | function | s = cap.snap()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,032 | suspend | ref | function | cap.suspend()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,033 | done | ref | function | cap.done()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,034 | raises | ref | function | pytest.raises(AssertionError, cap.suspend)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,048 | test_capfd_sys_stdout_mode | def | function | def test_capfd_sys_stdout_mode(self, capfd) -> None:
assert "b" not in sys.stdout.mode
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,053 | saved_fd | def | function | def saved_fd(fd):
new_fd = os.dup(fd)
try:
yield
finally:
os.dup2(new_fd, fd)
os.close(new_fd)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,062 | TestStdCapture | def | class | getcapture test_capturing_done_simple test_capturing_reset_simple test_capturing_readouterr test_capture_results_accessible_by_attribute test_capturing_readouterr_unicode test_reset_twice_error test_capturing_modify_sysouterr_in_between test_capturing_error_recursive test_just_out_capture test_just_err_capture test_std... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,066 | getcapture | def | function | def getcapture(self, **kw):
cap = self.__class__.captureclass(**kw)
cap.start_capturing()
try:
yield cap
finally:
cap.stop_capturing()
def test_capturing_done_simple(self) -> None:
with self.getcapture() as cap:
sys.stdout.write("hello... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,067 | captureclass | ref | class | |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,068 | start_capturing | ref | function | cap.start_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,072 | stop_capturing | ref | function | cap.stop_capturing()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,074 | test_capturing_done_simple | def | function | def test_capturing_done_simple(self) -> None:
with self.getcapture() as cap:
sys.stdout.write("hello")
sys.stderr.write("world")
out, err = cap.readouterr()
assert out == "hello"
assert err == "world"
def test_capturing_reset_simple(self) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,075 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,078 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,082 | test_capturing_reset_simple | def | function | def test_capturing_reset_simple(self) -> None:
with self.getcapture() as cap:
print("hello world")
sys.stderr.write("hello error\n")
out, err = cap.readouterr()
assert out == "hello world\n"
assert err == "hello error\n"
def test_capturing_readouterr(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,083 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,086 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,090 | test_capturing_readouterr | def | function | def test_capturing_readouterr(self) -> None:
with self.getcapture() as cap:
print("hello world")
sys.stderr.write("hello error\n")
out, err = cap.readouterr()
assert out == "hello world\n"
assert err == "hello error\n"
sys.stderr.write(... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,091 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,094 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,098 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,101 | test_capture_results_accessible_by_attribute | def | function | def test_capture_results_accessible_by_attribute(self) -> None:
with self.getcapture() as cap:
sys.stdout.write("hello")
sys.stderr.write("world")
capture_result = cap.readouterr()
assert capture_result.out == "hello"
assert capture_result.err == "world"
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,102 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,105 | readouterr | ref | function | capture_result = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,109 | test_capturing_readouterr_unicode | def | function | def test_capturing_readouterr_unicode(self) -> None:
with self.getcapture() as cap:
print("hxąć")
out, err = cap.readouterr()
assert out == "hxąć\n"
def test_reset_twice_error(self) -> None:
with self.getcapture() as cap:
print("hello")
ou... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,110 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,112 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,115 | test_reset_twice_error | def | function | def test_reset_twice_error(self) -> None:
with self.getcapture() as cap:
print("hello")
out, err = cap.readouterr()
pytest.raises(ValueError, cap.stop_capturing)
assert out == "hello\n"
assert not err
def test_capturing_modify_sysouterr_in_between(self) -... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,116 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,118 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,119 | raises | ref | function | pytest.raises(ValueError, cap.stop_capturing)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,123 | test_capturing_modify_sysouterr_in_between | def | function | def test_capturing_modify_sysouterr_in_between(self) -> None:
oldout = sys.stdout
olderr = sys.stderr
with self.getcapture() as cap:
sys.stdout.write("hello")
sys.stderr.write("world")
sys.stdout = capture.CaptureIO()
sys.stderr = capture.Captu... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,126 | getcapture | ref | function | with self.getcapture() as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,129 | CaptureIO | ref | function | sys.stdout = capture.CaptureIO()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,130 | CaptureIO | ref | function | sys.stderr = capture.CaptureIO()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,133 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,139 | test_capturing_error_recursive | def | function | def test_capturing_error_recursive(self) -> None:
with self.getcapture() as cap1:
print("cap1")
with self.getcapture() as cap2:
print("cap2")
out2, err2 = cap2.readouterr()
out1, err1 = cap1.readouterr()
assert out1 == "cap1\n"
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,140 | getcapture | ref | function | with self.getcapture() as cap1:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,142 | getcapture | ref | function | with self.getcapture() as cap2:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,144 | readouterr | ref | function | out2, err2 = cap2.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,145 | readouterr | ref | function | out1, err1 = cap1.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,149 | test_just_out_capture | def | function | def test_just_out_capture(self) -> None:
with self.getcapture(out=_True, err=_False) as cap:
sys.stdout.write("hello")
sys.stderr.write("world")
out, err = cap.readouterr()
assert out == "hello"
assert not err
def test_just_err_capture(self) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,150 | getcapture | ref | function | with self.getcapture(out=True, err=False) as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,153 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,157 | test_just_err_capture | def | function | def test_just_err_capture(self) -> None:
with self.getcapture(out=_False, err=_True) as cap:
sys.stdout.write("hello")
sys.stderr.write("world")
out, err = cap.readouterr()
assert err == "world"
assert not out
def test_stdin_restored(self) -> None:
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,158 | getcapture | ref | function | with self.getcapture(out=False, err=True) as cap:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,161 | readouterr | ref | function | out, err = cap.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,165 | test_stdin_restored | def | function | def test_stdin_restored(self) -> None:
old = sys.stdin
with self.getcapture(in_=_True):
newstdin = sys.stdin
assert newstdin != sys.stdin
assert sys.stdin is old
def test_stdin_nulled_by_default(self) -> None:
print("XXX this test may well hang instead of cra... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,167 | getcapture | ref | function | with self.getcapture(in_=True):
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,172 | test_stdin_nulled_by_default | def | function | def test_stdin_nulled_by_default(self) -> None:
print("XXX this test may well hang instead of crashing")
print("XXX which indicates an error in the underlying capturing")
print("XXX mechanisms")
with self.getcapture():
pytest.raises(OSError, sys.stdin.read)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,176 | getcapture | ref | function | with self.getcapture():
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,177 | raises | ref | function | pytest.raises(OSError, sys.stdin.read)
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,180 | TestTeeStdCapture | def | class | test_capturing_error_recursive |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,183 | test_capturing_error_recursive | def | function | def test_capturing_error_recursive(self) -> None:
with self.getcapture() as cap1:
print("cap1")
with self.getcapture() as cap2:
print("cap2")
out2, err2 = cap2.readouterr()
out1, err1 = cap1.readouterr()
assert out1 == "cap1\n"
... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,187 | getcapture | ref | function | with self.getcapture() as cap1:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,189 | getcapture | ref | function | with self.getcapture() as cap2:
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,191 | readouterr | ref | function | out2, err2 = cap2.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,192 | readouterr | ref | function | out1, err1 = cap1.readouterr()
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,197 | TestStdCaptureFD | def | class | test_simple_only_fd test_intermingling test_many |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,200 | test_simple_only_fd | def | function | def test_simple_only_fd(self, pytester: Pytester) -> None:
pytester.makepyfile(
"""\
import os
def test_x():
os.write(1, b"hello\\n")
assert 0
"""
)
result = pytester.runpytest_subprocess()
result.stdout.... |
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,201 | makepyfile | ref | function | pytester.makepyfile(
|
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py | testing/test_capture.py | 1,209 | runpytest_subprocess | ref | function | result = pytester.runpytest_subprocess()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.