Skip to content

Commit fa3f508

Browse files
committed
Add test on missing folders
1 parent 802b378 commit fa3f508

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

neo/test/rawiotest/test_openephysbinaryrawio.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import unittest
2+
import pytest
23

34
from neo.rawio.openephysbinaryrawio import OpenEphysBinaryRawIO
45
from neo.test.rawiotest.common_rawio_test import BaseTestRawIO
@@ -13,6 +14,7 @@ class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase):
1314
"openephysbinary/v0.5.x_two_nodes",
1415
"openephysbinary/v0.6.x_neuropixels_multiexp_multistream",
1516
"openephysbinary/v0.6.x_neuropixels_with_sync",
17+
"openephysbinary/v0.6.x_neuropixels_missing_folders"
1618
]
1719

1820
def test_sync(self):
@@ -48,6 +50,14 @@ def test_no_sync(self):
4850
)
4951
rawio_no_sync.parse_header()
5052

53+
def test_missing_folders(self):
54+
# missing folders should raise an error
55+
with self.assertWarns(UserWarning):
56+
rawio = OpenEphysBinaryRawIO(
57+
self.get_local_path("openephysbinary/v0.6.x_neuropixels_missing_folders"), load_sync_channel=False
58+
)
59+
rawio.parse_header()
60+
5161

5262
if __name__ == "__main__":
5363
unittest.main()

0 commit comments

Comments
 (0)