Skip to content

Commit 95a4d7e

Browse files
author
Lawrence
committed
Updated tests to working condition
1 parent 72b4ae3 commit 95a4d7e

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

+tests/+system/ElectrodeGroupIOTest.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
classdef ElectrodeGroupIOTest < tests.system.PyNWBIOTest
22
methods
33
function addContainer(testCase, file) %#ok<INUSL>
4-
dev = types.core.Device();
4+
% Device description is for pynwb compatibility
5+
dev = types.core.Device('description', 'dev1 description');
56
file.general_devices.set('dev1', dev);
67
eg = types.core.ElectrodeGroup( ...
78
'description', 'a test ElectrodeGroup', ...

+tests/+system/ImagingPlaneIOTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef ImagingPlaneIOTest < tests.system.PyNWBIOTest
22
methods
33
function addContainer(testCase, file) %#ok<INUSL>
4-
dev = types.core.Device();
4+
dev = types.core.Device('description', 'dev1 description');
55
oc = types.core.OpticalChannel( ...
66
'description', 'a fake OpticalChannel', ...
77
'emission_lambda', 3.14);

+tests/+system/PhotonSeriesIOTest.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef PhotonSeriesIOTest < tests.system.PyNWBIOTest & tests.system.AmendTest
22
methods
33
function addContainer(testCase, file) %#ok<INUSL>
4-
dev = types.core.Device();
4+
dev = types.core.Device('description', 'dev1 description');
55

66
oc = types.core.OpticalChannel( ...
77
'description', 'a fake OpticalChannel', ...

+tests/+system/PyNWBIOTest.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,16 @@ class ImagingPlaneIOTest(PyNWBIOTest):
148148
def addContainer(self, file):
149149
dev1 = file.create_device('imaging_device_1', 'dev1 description')
150150
oc = OpticalChannel('optchan1', 'a fake OpticalChannel', 3.14)
151-
ip = file.create_imaging_plane('imgpln1', oc, 'a fake ImagingPlane',
152-
dev1, 6.28, 2.718, 'GFP', 'somewhere in the brain')
151+
ip = file.create_imaging_plane(
152+
'imgpln1',
153+
oc,
154+
description = 'a fake ImagingPlane',
155+
device = dev1,
156+
excitation_lambda = 6.28,
157+
indicator = 'GFP',
158+
location = 'somewhere in the brain',
159+
imaging_rate = 2.718)
160+
153161
return ip
154162

155163
def getContainer(self, file):
@@ -160,8 +168,15 @@ class PhotonSeriesIOTest(PyNWBIOTest):
160168
def addContainer(self, file):
161169
dev1 = file.create_device('dev1', 'dev1 description')
162170
oc = OpticalChannel('optchan1', 'a fake OpticalChannel', 3.14)
163-
ip = file.create_imaging_plane('imgpln1', oc, 'a fake ImagingPlane',
164-
dev1, 6.28, 2.718, 'GFP', 'somewhere in the brain')
171+
ip = file.create_imaging_plane(
172+
'imgpln1',
173+
oc,
174+
description = 'a fake ImagingPlane',
175+
device = dev1,
176+
excitation_lambda = 6.28,
177+
indicator = 'GFP',
178+
location = 'somewhere in the brain',
179+
imaging_rate = 2.718)
165180
data = np.ones((3, 3, 3))
166181
timestamps = list(range(10))
167182
fov = [2.0, 2.0, 5.0]

0 commit comments

Comments
 (0)