MCPcopy Index your code
hub / github.com/mne-tools/mne-python / test_annot_sanitizing

Function test_annot_sanitizing

mne/tests/test_annotations.py:127–137  ·  view source on GitHub ↗

Test description sanitizing.

(tmp_path)

Source from the content-addressed store, hash-verified

125
126
127def test_annot_sanitizing(tmp_path):
128 """Test description sanitizing."""
129 annot = Annotations([0], [1], ["a;:b"])
130 fname = tmp_path / "custom-annot.fif"
131 annot.save(fname)
132 annot_read = read_annotations(fname)
133 _assert_annotations_equal(annot, annot_read)
134
135 # make sure pytest raises error on char-sequence that is not allowed
136 with pytest.raises(ValueError, match="in description not supported"):
137 Annotations([0], [1], ["a{COLON}b"])
138
139
140def test_raw_array_orig_times():

Callers

nothing calls this directly

Calls 4

saveMethod · 0.95
AnnotationsClass · 0.90
read_annotationsFunction · 0.90

Tested by

no test coverage detected