-
Notifications
You must be signed in to change notification settings - Fork 674
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
Use a fixture for npz files in test_bat #2981
Conversation
Fixes #2979 The file test_bat_IO.npy was created in one test and used in another one. This leads to the second test possibly failing when the tests are run in parallel. This commit moves creating the file into a fixture that the two tests depends. The new fixture also uses the tmpdir fixture to avoid the file created during the tests to remain in the test directory.
Codecov Report
@@ Coverage Diff @@
## develop #2981 +/- ##
========================================
Coverage 93.05% 93.05%
========================================
Files 186 186
Lines 24609 24609
Branches 3187 3187
========================================
Hits 22900 22900
Misses 1661 1661
Partials 48 48 Continue to review full report at Codecov.
|
There is one build failing in an odd way that seems absolutelly unrelated to the PR:
|
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 was initially confused as to how the original code worked without leaving files behind, but I guess it just always left the *.npy and I never actually fully ran the analysis tests since it got implemented....
Thanks @jbarnoud, lgtm!
@@ -58,6 +58,8 @@ Fixes | |||
Universe (PR #2893) | |||
* ensure that unistd.h is included on macOS when compiling ENCORE's spe.c | |||
(Issue #2934) | |||
* Fix tests for analysis.bat that could fail when run in parallel and that |
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 guess technically it should be newest first, but I've seen plenty of cases where we've not followed this so it's a bit late to be pedantic now 🤷♂️
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.
Oops... I have been doing it wrong for a while 😅
That's a weird one, I don't have a clue what's happening here :( I've restarted the job just to see if it's a consistent failure. |
Test still fails. Likely related, what's particularly interesting here is that unlike the py3.7+ tests, the h5py version which ends up being installed is 2.7 rather than 2.10. For some strange reason, the dry run does pick up 2.10, but then in the actual install it picks up 2.7: edit: typos |
Also, it looks like previous builds from 3 days ago were picking 2.10 as expected. |
Looks like the travis error was a fluke, probably with the conda-forge repository. |
How strange, I can't see anything upstream that would be the cause of this, at least it works now 🤷♂️ |
Fixes MDAnalysis#2979 ## Work done in this PR The file test_bat_IO.npy was created in one test and used in another one. This leads to the second test possibly failing when the tests are run in parallel. This commit moves creating the file into a fixture that the two tests depends. The new fixture also uses the tmpdir fixture to avoid the file created during the tests to remain in the test directory.
Fixes #2979
The file test_bat_IO.npy was created in one test and used in
another one. This leads to the second test possibly failing
when the tests are run in parallel. This commit moves to create
the file into a fixture that the two tests depend.
The new fixture also uses the tmpdir fixture to avoid the file
created during the tests to remain in the test directory.
PR Checklist
[ ] Docs?