MAINT: Use FileNotFound rather than ValueError#89
MAINT: Use FileNotFound rather than ValueError#89ephathaway merged 4 commits intoBEL-Public:developfrom
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.
@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 |
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.