Merge pull request #6765 from blueyed/capture-refactor-1
Refactor Capture classes: move/rename CaptureIO classes
This commit is contained in:
@@ -804,10 +804,10 @@ class TestCaptureIO:
|
||||
assert f.getvalue() == "foo\r\n"
|
||||
|
||||
|
||||
class TestCaptureAndPassthroughIO(TestCaptureIO):
|
||||
class TestTeeCaptureIO(TestCaptureIO):
|
||||
def test_text(self):
|
||||
sio = io.StringIO()
|
||||
f = capture.CaptureAndPassthroughIO(sio)
|
||||
f = capture.TeeCaptureIO(sio)
|
||||
f.write("hello")
|
||||
s1 = f.getvalue()
|
||||
assert s1 == "hello"
|
||||
@@ -818,7 +818,7 @@ class TestCaptureAndPassthroughIO(TestCaptureIO):
|
||||
|
||||
def test_unicode_and_str_mixture(self):
|
||||
sio = io.StringIO()
|
||||
f = capture.CaptureAndPassthroughIO(sio)
|
||||
f = capture.TeeCaptureIO(sio)
|
||||
f.write("\u00f6")
|
||||
pytest.raises(TypeError, f.write, b"hello")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user