From d728b6f7520176f93d68812e735a40544086dd83 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Wed, 6 Nov 2024 13:49:45 -0900 Subject: [PATCH] explicit status code in warning --- tests/integration/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 6d702a50..17458dfc 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -37,12 +37,13 @@ def pytest_sessionfinish(session, exitstatus): failure_rate = (100.0 * session.testsfailed) / session.testscollected if failure_rate <= ACCEPTABLE_FAILURE_RATE: + status_code = os.environ.get('EARTHACCESS_ALLOWABLE_FAILURE_STATUS_CODE', 99) warn( - '\nWARNING: The integration test suite has been allowed to pass because the ' + f'\nWARNING: The integration test suite has returned {status_code} because the ' 'failure rate was less than a hardcoded threshold. For more details see:\n' 'tests/integration/conftest.py.' ) - session.exitstatus = os.environ.get('EARTHACCESS_ALLOWABLE_FAILURE_STATUS_CODE', 99) + session.exitstatus = status_code @pytest.fixture