@@ -86,6 +86,7 @@ def test_basics():
8686 onset = np .array (range (10 ))
8787 duration = np .ones (10 )
8888 description = np .repeat ("test" , 10 )
89+ extras = [dict (foo = i ) for i in range (10 )]
8990 dt = raw .info ["meas_date" ]
9091 assert isinstance (dt , datetime )
9192 stamp = _dt_to_stamp (dt )
@@ -110,7 +111,7 @@ def test_basics():
110111 offset = offset [0 ] + offset [1 ] * 1e-6
111112 offset = orig_time - offset
112113 assert_allclose (offset , raw ._first_time )
113- annot = Annotations (onset , duration , description , orig_time )
114+ annot = Annotations (onset , duration , description , orig_time , extras = extras )
114115 assert annot .orig_time is not None
115116 assert " segments" in repr (annot )
116117 raw2 .set_annotations (annot )
@@ -122,6 +123,7 @@ def test_basics():
122123 assert_allclose (onset + offset + delta , raw .annotations .onset , rtol = 1e-5 )
123124 assert_array_equal (annot .duration , raw .annotations .duration )
124125 assert_array_equal (raw .annotations .description , np .repeat ("test" , 10 ))
126+ assert raw .annotations .extras == extras
125127
126128
127129def test_annot_sanitizing (tmp_path ):
0 commit comments