@@ -39,6 +39,25 @@ class HCITaggingTest(unittest.TestCase):
self.assertEqual(len(self.db.objects()),3490)
@db_available
deftest02_can_read_bdf(self):
from.modelsimportbdf_load_signal
forobjinself.db.objects():
path=obj.make_path(DATABASE_LOCATION,'.bdf')
self.assertTrue(os.path.exists(path))
signal,freq=bdf_load_signal(path)
time=len(signal)/freq
# correlation between video data and physiological signal
ifabs(time-obj.duration)>2:
print('Physiological signal (%d seconds) is very different in size from estimated video duration (%d seconds) on sample `%s/%s\''%(time,obj.duration,obj.basedir,obj.stem))
classCmdLineTest(unittest.TestCase):
"""Makes sure our command-line is working properly."""