From 8983e38bd8d873faa3c1399b18c83812255531d4 Mon Sep 17 00:00:00 2001 From: marqh Date: Mon, 24 Oct 2016 15:22:18 +0000 Subject: [PATCH] override test data path (#2211) --- lib/iris/config.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/iris/config.py b/lib/iris/config.py index fe6af85cd0..0c670544c7 100644 --- a/lib/iris/config.py +++ b/lib/iris/config.py @@ -132,8 +132,12 @@ def get_dir_option(section, option, default=None): # Override the data repository if the appropriate environment variable # has been set. This is used in setup.py in the TestRunner command to # enable us to simulate the absence of external data. -if os.environ.get("override_test_data_repository"): - TEST_DATA_DIR = None +override = os.environ.get("override_test_data_repository") +if override: + if override == '1': + TEST_DATA_DIR = None + else: + TEST_DATA_DIR = override PALETTE_PATH = get_dir_option(_RESOURCE_SECTION, 'palette_path', os.path.join(CONFIG_PATH, 'palette'))