-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply patched ecephys channel structure assignments to nwb data
- Loading branch information
1 parent
a067282
commit 6bee01c
Showing
3 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
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
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
27 changes: 27 additions & 0 deletions
27
allensdk/test/brain_observatory/ecephys/test_ecephys_session_nwb_api.py
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# most of the tests for this functionality are actually in test_write_nwb | ||
|
||
import pytest | ||
import pandas as pd | ||
|
||
import allensdk.brain_observatory.ecephys.ecephys_session_api.ecephys_nwb_session_api as ensa | ||
|
||
|
||
@pytest.mark.parametrize("left,right,expected,left_on,right_on", [ | ||
[ | ||
pd.DataFrame({"a": [1, 2, 3], "b": [1, 2, 3]}), | ||
pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]}), | ||
pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [7, 8, 9]}), | ||
"a", | ||
"a" | ||
], | ||
[ | ||
pd.DataFrame({"a": [1, 2, 3], "b": [1, 2, 3]}), | ||
pd.DataFrame({"a": [1, 2, 3], "b": [1, 2, 3], "c": [7, 8, 9]}), | ||
pd.DataFrame({"a": [1, 2, 3], "b": [1, 2, 3], "c": [7, 8, 9]}), | ||
["a", "b"], | ||
["a", "b"] | ||
] | ||
]) | ||
def test_clobbering_merge(left, right, expected, left_on, right_on): | ||
obtained = ensa.clobbering_merge(left, right, left_on=left_on, right_on=left_on) | ||
pd.testing.assert_frame_equal(expected, obtained, check_like=True) |