コード例 #1
0
ファイル: test_iostream.py プロジェクト: YosysHQ/prjtrellis
def test_guard_capture(capsys):
    msg = "I've been redirected to Python, I hope!"
    m.guard_output(msg)
    stdout, stderr = capsys.readouterr()
    assert stdout == msg
    assert stderr == ""
コード例 #2
0
ファイル: test_iostream.py プロジェクト: Soolo-ss/Solo2
def test_guard_capture(capsys):
    msg = "I've been redirected to Python, I hope!"
    m.guard_output(msg)
    stdout, stderr = capsys.readouterr()
    assert stdout == msg
    assert stderr == ''