Skip to content

Commit

Permalink
Update test_base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Feb 7, 2024
1 parent fdf8f3e commit 79cb3c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/hdf5/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,22 @@ def test_data_linking(self):
''' Test that data get linked to in TimeSeries '''
tsa = TimeSeries(name='a', data=np.linspace(0, 1, 1000), timestamps=np.arange(1000.), unit='m')
tsb = TimeSeries(name='b', data=tsa, timestamps=np.arange(1000.), unit='m')
tsc = TimeSeries(name='c', data=tsb, timestamps=np.arange(1000.), unit='m')
nwbfile = NWBFile(identifier='foo',
session_start_time=datetime(2017, 5, 1, 12, 0, 0, tzinfo=tzlocal()),
session_description='bar')
nwbfile.add_acquisition(tsa)
nwbfile.add_acquisition(tsb)
nwbfile.add_acquisition(tsc)
with NWBHDF5IO(self.path, 'w') as io:
io.write(nwbfile)
with NWBHDF5IO(self.path, 'r') as io:
nwbfile = io.read()
tsa = nwbfile.acquisition['a']
tsb = nwbfile.acquisition['b']
tsc = nwbfile.acquisition['c']
self.assertIs(tsa.data, tsb.data)
self.assertIs(tsa.data, tsc.data)


class TestImagesIO(AcquisitionH5IOMixin, TestCase):
Expand Down

0 comments on commit 79cb3c0

Please sign in to comment.