-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stock #2212
Stock #2212
Conversation
marqh
commented
Oct 25, 2016
- move stock npy arrays to iris-test-data stock arrays iris-test-data#45
- update skip_data pattern usage
- alter minimal testing environment to not use test_data
@@ -183,7 +183,10 @@ def get_data_path(relative_path): | |||
""" | |||
if not isinstance(relative_path, six.string_types): | |||
relative_path = os.path.join(*relative_path) | |||
data_path = os.path.join(iris.config.TEST_DATA_DIR, relative_path) | |||
test_data_dir = iris.config.TEST_DATA_DIR | |||
if test_data_dir is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need for this..
From how iris.config.TEST_DATA_DIR
is initialised in iris.config, I think this can't be empty ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it can occur, here:
https://github.com/SciTools/iris/blob/master/lib/iris/config.py#L138
override = os.environ.get("override_test_data_repository")
if override:
if override == '1':
TEST_DATA_DIR = None
else:
TEST_DATA_DIR = override
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought there would be more examples of a GraphicsTest overriding setUp.
However, this seems to be the only one.
class TestBasic(tests.GraphicsTest): | ||
cube = iris.tests.stock.realistic_4d() | ||
def setUp(self): | ||
self.cube = iris.tests.stock.realistic_4d() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to call the class setUp here :
super(TestBasic, self).setUp()
As a cross-check, I ran all tests with control exports:
The only failure is this one :
So, that needs wrapping with "skip_data". |
* move stock arrays to test data