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
607
test_capture_and_logging
def
function
def test_capture_and_logging(self, pytester: Pytester) -> None: """#14""" p = pytester.makepyfile( """\ import logging def test_log(capsys): logging.error('x') """ ) result = pytester.runpytest_subprocess(p) asse...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
609
makepyfile
ref
function
p = pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
616
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess(p)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
619
parametrize
ref
function
@pytest.mark.parametrize("fixture", ["capsys", "capfd"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
620
parametrize
ref
function
@pytest.mark.parametrize("no_capture", [True, False])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
621
test_disabled_capture_fixture
def
function
def test_disabled_capture_fixture( self, pytester: Pytester, fixture: str, no_capture: bool ) -> None: pytester.makepyfile( """\ def test_disabled({fixture}): print('captured before') with {fixture}.disabled(): print('wh...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
624
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
640
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess(*args)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
641
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*while capture is disabled*", "*= 2 passed in *"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
642
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*captured before*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
643
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*captured after*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
647
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*test_normal executed*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
649
test_disabled_capture_fixture_twice
def
function
def test_disabled_capture_fixture_twice(self, pytester: Pytester) -> None: """Test that an inner disabled() exit doesn't undo an outer disabled(). Issue #7148. """ pytester.makepyfile( """ def test_disabled(capfd): print('captured before') ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
654
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
667
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
668
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
677
parametrize
ref
function
@pytest.mark.parametrize("fixture", ["capsys", "capfd"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
678
test_fixture_use_by_other_fixtures
def
function
def test_fixture_use_by_other_fixtures(self, pytester: Pytester, fixture) -> None: """Ensure that capsys and capfd can be used by other fixtures during setup and teardown.""" pytester.makepyfile( """\ import sys import pytest @pytest.fixture ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
681
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
708
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
709
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
710
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*stdout contents begin*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
711
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*stderr contents begin*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
713
parametrize
ref
function
@pytest.mark.parametrize("cap", ["capsys", "capfd"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
714
test_fixture_use_by_other_fixtures_teardown
def
function
def test_fixture_use_by_other_fixtures_teardown( self, pytester: Pytester, cap ) -> None: """Ensure we can access setup and teardown buffers from teardown when using capsys/capfd (##3033)""" pytester.makepyfile( """\ import sys import pytest ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
718
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
740
inline_run
ref
function
reprec = pytester.inline_run()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
741
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
744
test_setup_failure_does_not_kill_capturing
def
function
def test_setup_failure_does_not_kill_capturing(pytester: Pytester) -> None: sub1 = pytester.mkpydir("sub1") sub1.joinpath("conftest.py").write_text( textwrap.dedent( """\ def pytest_runtest_setup(item): raise ValueError(42) """ ) ) sub1...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
745
mkpydir
ref
function
sub1 = pytester.mkpydir("sub1")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
746
joinpath
ref
function
sub1.joinpath("conftest.py").write_text(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
746
write_text
ref
function
sub1.joinpath("conftest.py").write_text(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
754
joinpath
ref
function
sub1.joinpath("test_mod.py").write_text("def test_func1(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
754
write_text
ref
function
sub1.joinpath("test_mod.py").write_text("def test_func1(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
755
runpytest
ref
function
result = pytester.runpytest(pytester.path, "--traceconfig")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
756
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*ValueError(42)*", "*1 error*"])
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
759
test_capture_conftest_runtest_setup
def
function
def test_capture_conftest_runtest_setup(pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_runtest_setup(): print("hello19") """ ) pytester.makepyfile("def test_func(): pass") result = pytester.runpytest() assert result.ret == 0 result.stdout.no_fn...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
760
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
766
makepyfile
ref
function
pytester.makepyfile("def test_func(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
767
runpytest
ref
function
result = pytester.runpytest()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
769
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*hello19*")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
772
test_capture_badoutput_issue412
def
function
def test_capture_badoutput_issue412(pytester: Pytester) -> None: pytester.makepyfile( """ import os def test_func(): omg = bytearray([1,129,1]) os.write(1, omg) assert 0 """ ) result = pytester.runpytest("--capture=fd") result.stdout.f...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
773
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
783
runpytest
ref
function
result = pytester.runpytest("--capture=fd")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
784
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
794
test_capture_early_option_parsing
def
function
def test_capture_early_option_parsing(pytester: Pytester) -> None: pytester.makeconftest( """ def pytest_runtest_setup(): print("hello19") """ ) pytester.makepyfile("def test_func(): pass") result = pytester.runpytest("-vs") assert result.ret == 0 assert "hello19"...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
795
makeconftest
ref
function
pytester.makeconftest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
801
makepyfile
ref
function
pytester.makepyfile("def test_func(): pass")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
802
runpytest
ref
function
result = pytester.runpytest("-vs")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
807
test_capture_binary_output
def
function
def test_capture_binary_output(pytester: Pytester) -> None: pytester.makepyfile( r""" import pytest def test_a(): import sys import subprocess subprocess.call([sys.executable, __file__]) def test_foo(): import os;os.write(1, b'\xc3') ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
808
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
824
runpytest
ref
function
result = pytester.runpytest("--assert=plain")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
825
assert_outcomes
ref
function
result.assert_outcomes(passed=2)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
828
test_error_during_readouterr
def
function
def test_error_during_readouterr(pytester: Pytester) -> None: """Make sure we suspend capturing if errors occur during readouterr""" pytester.makepyfile( pytest_xyz=""" from _pytest.capture import FDCapture def bad_snap(self): raise Exception('boom') assert FDCaptur...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
830
makepyfile
ref
function
pytester.makepyfile(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
841
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("-p", "pytest_xyz", "--version")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
842
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
847
TestCaptureIO
def
class
test_text test_unicode_and_str_mixture test_write_bytes_to_buffer
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
848
test_text
def
function
def test_text(self) -> None: f = capture.CaptureIO() f.write("hello") s = f.getvalue() assert s == "hello" f.close() def test_unicode_and_str_mixture(self) -> None: f = capture.CaptureIO() f.write("\u00f6") pytest.raises(TypeError, f.write, b"hell...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
849
CaptureIO
ref
function
f = capture.CaptureIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
851
getvalue
ref
function
s = f.getvalue()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
855
test_unicode_and_str_mixture
def
function
def test_unicode_and_str_mixture(self) -> None: f = capture.CaptureIO() f.write("\u00f6") pytest.raises(TypeError, f.write, b"hello") def test_write_bytes_to_buffer(self) -> None: """In python3, stdout / stderr are text io wrappers (exposing a buffer property of the unde...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
856
CaptureIO
ref
function
f = capture.CaptureIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
858
raises
ref
function
pytest.raises(TypeError, f.write, b"hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
860
test_write_bytes_to_buffer
def
function
def test_write_bytes_to_buffer(self) -> None: """In python3, stdout / stderr are text io wrappers (exposing a buffer property of the underlying bytestream). See issue #1407 """ f = capture.CaptureIO() f.buffer.write(b"foo\r\n") assert f.getvalue() == "foo\r\n"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
864
CaptureIO
ref
function
f = capture.CaptureIO()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
866
getvalue
ref
function
assert f.getvalue() == "foo\r\n"
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
869
TestTeeCaptureIO
def
class
test_text test_unicode_and_str_mixture
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
870
test_text
def
function
def test_text(self) -> None: f = capture.CaptureIO() f.write("hello") s = f.getvalue() assert s == "hello" f.close() def test_unicode_and_str_mixture(self) -> None: f = capture.CaptureIO() f.write("\u00f6") pytest.raises(TypeError, f.write, b"hell...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
872
TeeCaptureIO
ref
function
f = capture.TeeCaptureIO(sio)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
874
getvalue
ref
function
s1 = f.getvalue()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
876
getvalue
ref
function
s2 = sio.getvalue()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
881
test_unicode_and_str_mixture
def
function
def test_unicode_and_str_mixture(self) -> None: f = capture.CaptureIO() f.write("\u00f6") pytest.raises(TypeError, f.write, b"hello") def test_write_bytes_to_buffer(self) -> None: """In python3, stdout / stderr are text io wrappers (exposing a buffer property of the unde...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
883
TeeCaptureIO
ref
function
f = capture.TeeCaptureIO(sio)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
885
raises
ref
function
pytest.raises(TypeError, f.write, b"hello")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
888
test_dontreadfrominput
def
function
def test_dontreadfrominput() -> None: from _pytest.capture import DontReadFromInput f = DontReadFromInput() assert f.buffer is f assert not f.isatty() pytest.raises(OSError, f.read) pytest.raises(OSError, f.readlines) iter_f = iter(f) pytest.raises(OSError, next, iter_f) pytest.rais...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
891
DontReadFromInput
ref
function
f = DontReadFromInput()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
894
raises
ref
function
pytest.raises(OSError, f.read)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
895
raises
ref
function
pytest.raises(OSError, f.readlines)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
897
raises
ref
function
pytest.raises(OSError, next, iter_f)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
898
raises
ref
function
pytest.raises(UnsupportedOperation, f.fileno)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
902
test_captureresult
def
function
def test_captureresult() -> None: cr = CaptureResult("out", "err") assert len(cr) == 2 assert cr.out == "out" assert cr.err == "err" out, err = cr assert out == "out" assert err == "err" assert cr[0] == "out" assert cr[1] == "err" assert cr == cr assert cr == CaptureResult("o...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
903
CaptureResult
ref
function
cr = CaptureResult("out", "err")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
913
CaptureResult
ref
function
assert cr == CaptureResult("out", "err")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
914
CaptureResult
ref
function
assert cr != CaptureResult("wrong", "err")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
917
CaptureResult
ref
function
assert hash(cr) == hash(CaptureResult("out", "err"))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
926
raises
ref
function
with pytest.raises(ValueError):
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
929
_replace
ref
function
assert cr._replace(err="replaced") == ("out", "replaced")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
933
tmpfile
def
function
def tmpfile(pytester: Pytester) -> Generator[BinaryIO, None, None]: f = pytester.makepyfile("").open("wb+") yield f if not f.closed: f.close()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
934
makepyfile
ref
function
f = pytester.makepyfile("").open("wb+")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
941
lsof_check
def
function
def lsof_check(): pid = os.getpid() try: out = subprocess.check_output(("lsof", "-p", str(pid))).decode() except (OSError, subprocess.CalledProcessError, UnicodeDecodeError) as exc: # about UnicodeDecodeError, see note on pytester pytest.skip(f"could not run 'lsof' ({exc!r})") yi...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
944
decode
ref
function
out = subprocess.check_output(("lsof", "-p", str(pid))).decode()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
947
skip
ref
function
pytest.skip(f"could not run 'lsof' ({exc!r})")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
949
decode
ref
function
out2 = subprocess.check_output(("lsof", "-p", str(pid))).decode()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
955
TestFDCapture
def
class
test_simple test_simple_many test_simple_many_check_open_files test_simple_fail_second_start test_stderr test_stdin test_writeorg test_simple_resume_suspend test_capfd_sys_stdout_mode
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
956
test_simple
def
function
def test_simple(self, tmpfile: BinaryIO) -> None: fd = tmpfile.fileno() cap = capture.FDCapture(fd) data = b"hello" os.write(fd, data) pytest.raises(AssertionError, cap.snap) cap.done() cap = capture.FDCapture(fd) cap.start() os.write(fd, data)...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
958
FDCapture
ref
function
cap = capture.FDCapture(fd)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
961
raises
ref
function
pytest.raises(AssertionError, cap.snap)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
962
done
ref
function
cap.done()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/testing/test_capture.py
testing/test_capture.py
963
FDCapture
ref
function
cap = capture.FDCapture(fd)