예제 #1
0
def test_cpp_failure_repr(dummy_failure):
    dummy_failure.lines = [("error message", {"red"})]
    dummy_failure.file_reference = "test_suite", 20
    failure_repr = CppFailureRepr([dummy_failure])
    assert str(failure_repr) == "error message\ntest_suite:20: C++ failure"
예제 #2
0
def test_cpp_failure_repr(dummy_failure):
    dummy_failure.lines = [('error message', {'red'})]
    dummy_failure.file_reference = 'test_suite', 20
    failure_repr = CppFailureRepr([dummy_failure])
    assert str(failure_repr) == 'error message\ntest_suite:20: C++ failure'
예제 #3
0
파일: plugin.py 프로젝트: fj128/pytest-cpp
 def repr_failure(self, excinfo):
     if isinstance(excinfo.value, CppFailureError):
         return CppFailureRepr(excinfo.value.failures)
     return pytest.Item.repr_failure(self, excinfo)