We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 051dd04 commit 3c1159dCopy full SHA for 3c1159d
tests/test_console.py
@@ -351,7 +351,7 @@ def test_capture():
351
assert capture.get() == "Hello\n"
352
353
354
-def test_capture_and_record():
+def test_capture_and_record(capsys):
355
recorder = Console(record=True)
356
recorder.print("ABC")
357
@@ -360,9 +360,12 @@ def test_capture_and_record():
360
361
362
363
- text = recorder.export_text()
364
- assert text == "ABC\nHello\n"
+ recorded_text = recorder.export_text()
+ out, err = capsys.readouterr()
365
+
366
+ assert recorded_text == "ABC\nHello\n"
367
368
+ assert out == "ABC\n"
369
370
371
def test_input(monkeypatch, capsys):
0 commit comments