From ef786901e7a74022db0370b5b2a524900d0ef4df Mon Sep 17 00:00:00 2001 From: Armen Zambrano G Date: Mon, 13 Apr 2020 15:23:37 -0400 Subject: [PATCH] Raise exception if ADR_CONFIG is not set for integration tests When running pytest against the integration tests we need to set ADR_CONFIG as an environment variable manually. This warns the user that the variable is required. --- tests/test_integration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_integration.py b/tests/test_integration.py index 9ae882f..041bc79 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -13,6 +13,9 @@ pytestmark = pytest.mark.skipif( os.environ.get("TRAVIS_EVENT_TYPE") != "cron", reason="Not run by a cron task" ) +if not os.environ.get("ADR_CONFIG_PATH"): + raise Exception("Set ADR_CONFIG_PATH to tests/config.toml") + @pytest.fixture def adr_config(tmp_path):