Skip to content

Commit

Permalink
Update AnnotatedEvents unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed May 29, 2020
1 parent 53a83eb commit 3fa59e2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/pynwb/tests/unit/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,19 @@ def test_add_event_type(self):
event_times=[1., 2., 3.],
id=3
)
self.assertEqual(events.id.data, [3])
events.add_event_type(
label='Abort',
event_description='Times when the animal aborted the trial.',
event_times=[0.5, 4.5],
id=4
)
self.assertEqual(events.id.data, [3, 4])
self.assertEqual(events['event_times'][0], [1., 2., 3.])
self.assertEqual(events['event_times'][1], [0.5, 4.5])
self.assertEqual(events['label'][0], 'Reward')
self.assertEqual(events['label'][1], 'Abort')
self.assertListEqual(events['event_description'].data, ['Times when the animal received juice reward.',
'Times when the animal aborted the trial.'])
self.assertEqual(events.colnames, ('event_times', 'label', 'event_description'))
self.assertEqual(len(events.columns), 4)
self.assertEqual(events.columns[0].name, 'event_times_index')
Expand Down

0 comments on commit 3fa59e2

Please sign in to comment.