Skip to content

Commit

Permalink
override test data path (#2211)
Browse files Browse the repository at this point in the history
  • Loading branch information
marqh authored and DPeterK committed Oct 24, 2016
1 parent 8c2dda9 commit 8983e38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/iris/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit 8983e38

Please sign in to comment.