11import unittest
2+ from pathlib import Path
23
34from neo .rawio .spikegadgetsrawio import SpikeGadgetsRawIO
45from neo .test .rawiotest .common_rawio_test import BaseTestRawIO
@@ -15,17 +16,17 @@ class TestSpikeGadgetsRawIO(
1516 "spikegadgets/20210225_em8_minirec2_ac.rec" ,
1617 "spikegadgets/W122_06_09_2019_1_fromSD.rec" ,
1718 "spikegadgets/SpikeGadgets_test_data_2xNpix1.0_20240318_173658.rec" ,
19+ "spikegadgets/SL18_D19_S01_F01_BOX_SLP_20230503_112642_stubbed.rec"
1820 ]
1921
20- class TestSpikeGadgetsRawIOHeaderOnly (unittest .TestCase ):
21- def setUp (self ):
22- filename = "spikegadgets/SL18_D19_S01_F01_BOX_SLP_20230503_112642_stubbed.rec"
23- self .rawio = SpikeGadgetsRawIO (filename = filename )
24-
25- def test_parse_header (self ):
26- self .rawio .parse_header ()
22+ def test_parse_header_missing_channels (self ):
23+
24+ file_path = Path (self .get_local_path ("spikegadgets/SL18_D19_S01_F01_BOX_SLP_20230503_112642_stubbed.rec" ))
25+ reader = SpikeGadgetsRawIO (filename = file_path )
26+ reader .parse_header ()
27+
2728 assert_array_equal (
28- self . rawio .header ['signal_channels' ]['id' ],
29+ reader .header ['signal_channels' ]['id' ],
2930 [
3031 'ECU_Ain1' , 'ECU_Ain2' , 'ECU_Ain3' , 'ECU_Ain4' , 'ECU_Ain5' , 'ECU_Ain6' ,
3132 'ECU_Ain7' , 'ECU_Ain8' , 'ECU_Aout1' , 'ECU_Aout2' , 'ECU_Aout3' , 'ECU_Aout4' , '0' ,
@@ -49,6 +50,3 @@ def test_parse_header(self):
4950 '255' ,
5051 ]
5152 )
52-
53- if __name__ == "__main__" :
54- unittest .main ()
0 commit comments