def test_parser(): err = ("FAILED (errors=1)", 1, 0) fail = ("FAILED (failures=1)", 0, 1) both = ("FAILED (errors=1, failures=1)", 1, 1) for txt, nerr, nfail in [err, fail, both]: nerr1, nfail1 = tt.parse_test_output(txt) yield nt.assert_equal(nerr, nerr1) yield nt.assert_equal(nfail, nfail1)
def test_parser(): err = ("FAILED (errors=1)", 1, 0) fail = ("FAILED (failures=1)", 0, 1) both = ("FAILED (errors=1, failures=1)", 1, 1) for txt, nerr, nfail in [err, fail, both]: nerr1, nfail1 = tt.parse_test_output(txt) assert nerr == nerr1 assert nfail == nfail1