Skip to content

Commit

Permalink
Merge branch 'dev' into icephys-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bendichter authored Jul 9, 2019
2 parents 116fd54 + b346401 commit a796dfd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pynwb/io/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ class SubjectMap(ObjectMapper):

@ObjectMapper.constructor_arg('date_of_birth')
def dateconversion(self, builder, manager):
datestr = builder.get('date_of_birth').data
date = dateutil_parse(datestr)
return date
dob_builder = builder.get('date_of_birth')
if dob_builder is None:
return
else:
datestr = dob_builder.data
date = dateutil_parse(datestr)
return date
12 changes: 12 additions & 0 deletions tests/integration/ui_write/test_nwbfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@ def getContainer(self, nwbfile):
return nwbfile.subject


class TestEmptySubjectIO(TestSubjectIO):
def setUpContainer(self):
return Subject()

def setUpBuilder(self):
return GroupBuilder('subject',
attributes={'namespace': base.CORE_NAMESPACE,
'neurodata_type': 'Subject',
'help': 'Information about the subject'},
datasets={})


class TestEpochsRoundtrip(base.TestMapRoundTrip):

def setUpContainer(self):
Expand Down

0 comments on commit a796dfd

Please sign in to comment.