Ejemplo n.º 1
0
def test_CaptureResult_for_fail_with_path(capsys):
    r = result.CaptureResult()
    r.start(Mock())
    r.fail("message1", path=["x", "y"])
    r.end()
    captured = capsys.readouterr()
    assert "message1 at x.y" in captured.out
Ejemplo n.º 2
0
def test_CaptureResult_for_passing_verification_with_warning(capsys):
    r = result.CaptureResult()
    r.start(Mock())
    r.warn("message1")
    r.end()
    captured = capsys.readouterr()
    assert "PASSED" in captured.out
    assert "message1" in captured.out
Ejemplo n.º 3
0
def test_CaptureResult_for_failing_verification(capsys):
    r = result.CaptureResult()
    r.start(Mock())
    r.fail("message1")
    r.end()
    captured = capsys.readouterr()
    assert "FAILED" in captured.out
    assert "message1" in captured.out
Ejemplo n.º 4
0
def test_CaptureResult_for_passing_verification(capsys):
    r = result.CaptureResult()
    r.start(Mock())
    r.end()
    captured = capsys.readouterr()
    assert "PASSED" in captured.out