@@ -361,19 +361,19 @@ def test_equality(self):
361361 self .assertNotEqual (ns0 , ns1 )
362362
363363
364- # I comment this now and will put it back when files will be in gin.g-node
365- # class TestNlxHeader(TestNeuralynxRawIO, unittest.TestCase):
366- # def test_no_date_time(self):
367- # filename = self.get_local_path("neuralynx/NoDateHeader/NoDateHeader.nev")
364+ class TestNlxHeader (TestNeuralynxRawIO , unittest .TestCase ):
365+ def test_no_date_time (self ):
366+ filename = self .get_local_path ("neuralynx/NoDateHeader/NoDateHeader.nev" )
368367
369- # with self.assertRaises(IOError):
370- # hdr = NlxHeader(filename)
368+ with self .assertRaises (IOError ):
369+ hdr = NlxHeader (filename )
370+
371+ hdr = NlxHeader (filename , props_only = True )
371372
372- # hdr = NlxHeader(filename, props_only=True)
373+ self .assertEqual (len (hdr ), 11 ) # 9 properties plus channel_ids and channel_names
374+ self .assertEqual (hdr ["ApplicationName" ], "Pegasus" )
375+ self .assertEqual (hdr ["FileType" ], "Event" )
373376
374- # self.assertEqual(len(hdr), 11)
375- # self.assertEqual(hdr['ApplicationName'], 'Pegasus')
376- # self.assertEqual(hdr['FileType'], 'Event')
377377
378378if __name__ == "__main__" :
379379 unittest .main ()
0 commit comments