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_capture.py
testing/test_capture.py
494
runpytest
ref
function
result = pytester.runpytest(p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
495
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
499
parametrize
ref
function
@pytest.mark.parametrize("method", ["sys", "fd"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
500
test_capture_is_represented_on_failure_issue128
def
function
def test_capture_is_represented_on_failure_issue128( self, pytester: Pytester, method ) -> None: p = pytester.makepyfile( """\ def test_hello(cap{}): print("xxx42xxx") assert 0 """.format( method ) ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
503
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
512
runpytest
ref
function
result = pytester.runpytest(p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
513
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["xxx42xxx"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
515
test_stdfd_functional
def
function
def test_stdfd_functional(self, pytester: Pytester) -> None: reprec = pytester.inline_runsource( """\ def test_hello(capfd): import os os.write(1, b"42") out, err = capfd.readouterr() assert out.startswith("42") ...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
516
inline_runsource
ref
function
reprec = pytester.inline_runsource(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
526
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
528
parametrize
ref
function
@pytest.mark.parametrize("nl", ("\n", "\r\n", "\r"))
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
529
test_cafd_preserves_newlines
def
function
def test_cafd_preserves_newlines(self, capfd, nl) -> None: print("test", end=nl) out, err = capfd.readouterr() assert out.endswith(nl) def test_capfdbinary(self, pytester: Pytester) -> None: reprec = pytester.inline_runsource( """\ def test_hello(capfdbin...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
531
readouterr
ref
function
out, err = capfd.readouterr()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
534
test_capfdbinary
def
function
def test_capfdbinary(self, pytester: Pytester) -> None: reprec = pytester.inline_runsource( """\ def test_hello(capfdbinary): import os # some likely un-decodable bytes os.write(1, b'\\xfe\\x98\\x20') out, err = capfdbin...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
535
inline_runsource
ref
function
reprec = pytester.inline_runsource(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
546
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
548
test_capsysbinary
def
function
def test_capsysbinary(self, pytester: Pytester) -> None: p1 = pytester.makepyfile( r""" def test_hello(capsysbinary): import sys sys.stdout.buffer.write(b'hello') # Some likely un-decodable bytes. sys.stdout.buffer.wri...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
549
makepyfile
ref
function
p1 = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
573
runpytest
ref
function
result = pytester.runpytest(str(p1), "-rA")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
574
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
584
test_partial_setup_failure
def
function
def test_partial_setup_failure(self, pytester: Pytester) -> None: p = pytester.makepyfile( """\ def test_hello(capsys, missingarg): pass """ ) result = pytester.runpytest(p) result.stdout.fnmatch_lines(["*test_partial_setup_failure*...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
585
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
591
runpytest
ref
function
result = pytester.runpytest(p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
592
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*test_partial_setup_failure*", "*1 error*"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
594
test_keyboardinterrupt_disables_capturing
def
function
def test_keyboardinterrupt_disables_capturing(self, pytester: Pytester) -> None: p = pytester.makepyfile( """\ def test_hello(capfd): import os os.write(1, b'42') raise KeyboardInterrupt() """ ) result = pyte...
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
595
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
603
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess(p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
604
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*KeyboardInterrupt*"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
609
makepyfile
ref
function
p = pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
616
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess(p)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
619
parametrize
ref
function
@pytest.mark.parametrize("fixture", ["capsys", "capfd"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
620
parametrize
ref
function
@pytest.mark.parametrize("no_capture", [True, False])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
624
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
640
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess(*args)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
642
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*captured before*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
643
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*captured after*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
647
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*test_normal executed*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
654
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
667
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
668
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
677
parametrize
ref
function
@pytest.mark.parametrize("fixture", ["capsys", "capfd"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
681
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
708
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
709
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*1 passed*"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
710
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*stdout contents begin*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
711
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*stderr contents begin*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
713
parametrize
ref
function
@pytest.mark.parametrize("cap", ["capsys", "capfd"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
718
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
740
inline_run
ref
function
reprec = pytester.inline_run()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
741
assertoutcome
ref
function
reprec.assertoutcome(passed=1)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
745
mkpydir
ref
function
sub1 = pytester.mkpydir("sub1")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
746
joinpath
ref
function
sub1.joinpath("conftest.py").write_text(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
746
write_text
ref
function
sub1.joinpath("conftest.py").write_text(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
755
runpytest
ref
function
result = pytester.runpytest(pytester.path, "--traceconfig")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
756
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(["*ValueError(42)*", "*1 error*"])
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
760
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
766
makepyfile
ref
function
pytester.makepyfile("def test_func(): pass")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
767
runpytest
ref
function
result = pytester.runpytest()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
769
no_fnmatch_line
ref
function
result.stdout.no_fnmatch_line("*hello19*")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
773
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
783
runpytest
ref
function
result = pytester.runpytest("--capture=fd")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
784
fnmatch_lines
ref
function
result.stdout.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
795
makeconftest
ref
function
pytester.makeconftest(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
801
makepyfile
ref
function
pytester.makepyfile("def test_func(): pass")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
802
runpytest
ref
function
result = pytester.runpytest("-vs")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
808
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
824
runpytest
ref
function
result = pytester.runpytest("--assert=plain")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
825
assert_outcomes
ref
function
result.assert_outcomes(passed=2)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
830
makepyfile
ref
function
pytester.makepyfile(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
841
runpytest_subprocess
ref
function
result = pytester.runpytest_subprocess("-p", "pytest_xyz", "--version")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
842
fnmatch_lines
ref
function
result.stderr.fnmatch_lines(
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
849
CaptureIO
ref
function
f = capture.CaptureIO()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
851
getvalue
ref
function
s = f.getvalue()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
856
CaptureIO
ref
function
f = capture.CaptureIO()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
858
raises
ref
function
pytest.raises(TypeError, f.write, b"hello")
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
864
CaptureIO
ref
function
f = capture.CaptureIO()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
866
getvalue
ref
function
assert f.getvalue() == "foo\r\n"
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
869
TestTeeCaptureIO
def
class
test_text test_unicode_and_str_mixture
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/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/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
872
TeeCaptureIO
ref
function
f = capture.TeeCaptureIO(sio)
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
874
getvalue
ref
function
s1 = f.getvalue()
playground/385a4687-3c82-4369-b8de-c1d8c2e759f9/pytest/testing/test_capture.py
testing/test_capture.py
876
getvalue
ref
function
s2 = sio.getvalue()