Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Jan 13, 2025
1 parent f82480c commit 524309b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_on_data/ecephys/test_recording_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,23 +271,23 @@ def test_not_adding_extra_devices_when_recording_has_groups(self, setup_interfac
# Test that no extra-devices are added when the recording has groups

nwbfile = mock_NWBFile()
self.interface.add_to_nwbfile(nwbfile=nwbfile)
recording = self.interface.recording_extractor
num_channels = recording.get_num_channels()
channel_groups = np.full(shape=num_channels, fill_value=0, dtype=int)
channel_groups[::2] = 1
channel_groups[::2] = 1 # Every other channel is in group 1, the rest are in group 0
recording.set_channel_groups(groups=channel_groups)

self.interface.add_to_nwbfile(nwbfile=nwbfile)
assert len(nwbfile.devices) == 1

nwbfile = mock_NWBFile()
self.interface.add_to_nwbfile(nwbfile=nwbfile)
recording = self.interface.recording_extractor
num_channels = recording.get_num_channels()
group_names = np.full(shape=num_channels, fill_value="A", dtype="str")
group_names[::2] = "B"
group_names[::2] = "B" # Every other channel group is named B, the rest are named A
recording.set_property("group_name", group_names)

self.interface.add_to_nwbfile(nwbfile=nwbfile)
assert len(nwbfile.devices) == 1


Expand Down

0 comments on commit 524309b

Please sign in to comment.