Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/iris/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,11 @@ 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.
override = os.environ.get("override_test_data_repository")
override = os.environ.get("OVERRIDE_TEST_DATA_REPOSITORY")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does there need to be another change somewhere so that this environment variable is now supplied in all-caps? Or is this just something that a user specifies to the commandline at runtime?

if override:
if override == '1':
TEST_DATA_DIR = None
else:
TEST_DATA_DIR = override
TEST_DATA_DIR = None
if os.path.isdir(os.path.expanduser(override)):
TEST_DATA_DIR = os.path.abspath(override)

PALETTE_PATH = get_dir_option(_RESOURCE_SECTION, 'palette_path',
os.path.join(CONFIG_PATH, 'palette'))
Expand Down
3 changes: 2 additions & 1 deletion lib/iris/tests/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def finalize_options(self):
# processes that nose.run creates.
if self.no_data:
print('Running tests in no-data mode...')
os.environ['override_test_data_repository'] = 'true'
import iris.config
iris.config.TEST_DATA_DIR = None
if self.create_missing:
os.environ['IRIS_TEST_CREATE_MISSING'] = 'true'

Expand Down