Test mne compare_fiff.
(tmp_path)
| 106 | # should match ".*valid tag.*" but conda-linux intermittently fails for some reason |
| 107 | @pytest.mark.filterwarnings("ignore:Invalid tag.*:RuntimeWarning") |
| 108 | def test_show_fiff(tmp_path): |
| 109 | """Test mne compare_fiff.""" |
| 110 | if os.getenv("MNE_CI_KIND", "") == "conda" and platform.system() == "Linux": |
| 111 | pytest.skip("Skipping test on conda-linux due to intermittent failures") |
| 112 | check_usage(mne_show_fiff) |
| 113 | with ArgvSetter((raw_fname,)): |
| 114 | mne_show_fiff.run() |
| 115 | with ArgvSetter((raw_fname, "--tag=102")): |
| 116 | mne_show_fiff.run() |
| 117 | bad_fname = tmp_path / "test_bad_raw.fif" |
| 118 | with open(bad_fname, "wb") as fout, open(raw_fname, "rb") as fin: |
| 119 | fout.write(fin.read(100000)) |
| 120 | lines = show_fiff(bad_fname, output=list) |
| 121 | last_line = lines[-1] |
| 122 | assert last_line.endswith(">>>>BAD @9015") |
| 123 | assert "302 = FIFF_EPOCH (734412b >f4)" in last_line |
| 124 | |
| 125 | |
| 126 | @requires_mne |
nothing calls this directly
no test coverage detected