MCPcopy
hub / github.com/mne-tools/mne-python / test_show_fiff

Function test_show_fiff

mne/commands/tests/test_commands.py:108–123  ·  view source on GitHub ↗

Test mne compare_fiff.

(tmp_path)

Source from the content-addressed store, hash-verified

106# should match ".*valid tag.*" but conda-linux intermittently fails for some reason
107@pytest.mark.filterwarnings("ignore:Invalid tag.*:RuntimeWarning")
108def 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

Callers

nothing calls this directly

Calls 6

ArgvSetterClass · 0.90
check_usageFunction · 0.85
show_fiffFunction · 0.85
writeMethod · 0.80
readMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected