From: stark, steven Date: Mon, 8 Apr 2019 20:39:28 +0000 (-0700) Subject: [VVP] adding base test failure message to report X-Git-Tag: 5.0.0~49^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=commitdiff_plain;h=7ee8ce0d0411c6f24172ac93a00c7aa4c60ba460 [VVP] adding base test failure message to report Change-Id: Ibdb75750624d1482d87466b17aa2486f794a5fd6 Issue-ID: VVP-189 Signed-off-by: stark, steven --- diff --git a/ice_validator/tests/conftest.py b/ice_validator/tests/conftest.py index abb6f3a..88dc6b3 100644 --- a/ice_validator/tests/conftest.py +++ b/ice_validator/tests/conftest.py @@ -312,7 +312,6 @@ def pytest_runtest_makereport(item, call): if outcome.get_result().when != "call": return # only capture results of test cases themselves result = TestResult(item, outcome) - ALL_RESULTS.append(result) if ( not item.config.option.continue_on_failure and result.is_base_test @@ -321,8 +320,12 @@ def pytest_runtest_makereport(item, call): msg = "!!Base Test Failure!! Halting test suite execution...\n{}".format( result.error_message ) + result.error_message = msg + ALL_RESULTS.append(result) pytest.exit("{}\n{}\n{}".format(msg, result.files, result.test_case)) + ALL_RESULTS.append(result) + def make_timestamp(): """