Repository navigation
Removing hardcoded filepaths in tests. - #10515
Merged
pllim merged 2 commits intoNov 6, 2020
Merged
Conversation
Member
|
Hello, given the draft status of this PR and the impending feature freeze tomorrow, I am moving the milestone. Thank you for your understanding. |
Contributor
Author
|
Ok I forgot this PR existed... |
i-am-b-soto
force-pushed
the
remove_hardcoded_filepaths_in_tests
branch
from
November 6, 2020 09:09
da08bf7 to
a980805
Compare
i-am-b-soto
marked this pull request as ready for review
November 6, 2020 09:10
i-am-b-soto
force-pushed
the
remove_hardcoded_filepaths_in_tests
branch
from
November 6, 2020 09:47
a980805 to
e735d0a
Compare
Contributor
Author
|
Ultimately decided to leave the hardcoded filepath in /io/fits/tests/init.py |
pllim
approved these changes
Nov 6, 2020
pllim
left a comment
Member
There was a problem hiding this comment.
Thank you! RTD and remote data failures are unrelated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request follows #10344 and is attempting to remove hardcoded filepaths in tests in situations where
get_pkg_data_filenameorget_pkg_data_fileobjcan be better used instead.One problem I'm having right now is with
FitsTestCasein /io/fits/tests/init.pyIt carries an attribute data_dir that uses a os.path() for the data path. I have removed this attribute in this PR but it's referenced elsewhere. Once on line 733 in /fits/tests/test_hdulist.py, here I believe I've written the correct equivalent without using _data_dir.
And again in
def test_path(self, capsys)in /fits/tests/test_fitsdiff.py , there I haven't figured out a correct equivalent.Do we think it's beneficial to remove this data_dir attribute?
Overall, this is the work I've done so far, so feel free to tell me if there's something you want added/removed/changed.
Fixes #10344