-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple test for reading non-MIES files.
- Loading branch information
1 parent
3739921
commit 9643dc1
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
Binary file modified
BIN
+20.9 MB
(16000000%)
tests/data/nwb/Ctgf-T2A-dgCre;Ai14-495723.05.02.01.nwb
100755 → 100644
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
from ipfx.dataset.create import is_file_mies | ||
from ipfx.dataset.create import is_file_mies, create_ephys_data_set | ||
|
||
TEST_NWB_FILE_PATH = 'tests/data/nwb/Ctgf-T2A-dgCre;Ai14-495723.05.02.01.nwb' | ||
TEST_MIES_FILE_PATH = 'tests/data/nwb/Ctgf-T2A-dgCre;Ai14-495723.05.02.01.nwb' | ||
TEST_NON_MIES_FILE_PATH = 'tests/data/2018_03_20_0005.nwb' | ||
|
||
def test_is_file_mies(): | ||
assert is_file_mies(TEST_NWB_FILE_PATH) == True | ||
assert is_file_mies(TEST_MIES_FILE_PATH) == True | ||
|
||
def test_is_file_mies_with_non_mies_file(): | ||
""" | ||
Tests the case where the file is not detected as a MIES file. | ||
The file is read using the ipfx.dataset.hbg_nwb_data.HBGNWBData class. | ||
""" | ||
assert is_file_mies(TEST_NON_MIES_FILE_PATH) == False | ||
nwb_data = create_ephys_data_set(TEST_NON_MIES_FILE_PATH) | ||
assert nwb_data is not None | ||
assert len(nwb_data.ontology.stimuli) > 0 |