-
Notifications
You must be signed in to change notification settings - Fork 7
MAINT: Use FileNotFound rather than ValueError #89
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
Conversation
Running |
I think the autouse fixture is a bit more standard, do you agree it's worth keeping the new way? If so I can clean up the makefile not to need this and people can just do |
Yeah, let's keep it. I think this will make it a bit more user friendly. |
|
@larsoner, please take a look at larsoner#1. Thanks |
ephathaway
left a comment
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.
@larsoner can you go ahead and remove the mff2mfz.py call from the makefile? Then I think this is ready to merge.
|
I left the conversion target itself in there but removed the call to it in |
I think the way you did it makes sense. Thanks. See larsoner#2 to address the GH workflow failure. |
|
The pesky "workflow awaiting approval" box needs to clicked to get CIs to run here |
ephathaway
left a comment
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.
Thanks @larsoner!
Opens a PR to address the comment in mne-tools/mne-python#9406 (comment), namely that trying to open a file that does not exist should raise FileNotFoundError rather than ValueError. In trying to test this,
pytestfailed for me, for two reasons:mfzfile did not exist. Some sleuthing suggested that I needed to dopython ./bin/mff2mfz.py ./examples/example_1.mff, but it seems cleaner just to do it automagically using pytestconftest.py, which is now implemented.test_writer.py. Specfically, the use of.cacheacross a bunch of tests creates dependencies that can be problematic. Using the standardtmpdirpytest fixture is a clean, standard way to address this issue, so I implemented it.I can revert these if you want, but in theory this should make it easier for your users (or CIs, if you want to implement them!) to do
pytestand just have things work, and to iterate over tests more easily.