File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,31 @@ def test_get_morphology_root(self):
410410 def runTest (self ):
411411 print ("Running tests in TestCell" )
412412
413+ def test_get_parameters (self ):
414+ """Test get_parameters"""
415+ cells = ["pyr_4_sym" ]
416+
417+ for cell_name in cells :
418+ local_path = "../examples/test_files/%s.cell.nml" % cell_name
419+ if os .path .isfile (local_path ):
420+ test_file_path = local_path
421+ else :
422+ root_dir = os .path .dirname (neuroml .__file__ )
423+ test_file_path = os .path .join (
424+ root_dir , "examples/test_files/%s.cell.nml" % cell_name
425+ )
426+ print ("test file path is: " + test_file_path )
427+
428+ doc = loaders .NeuroMLLoader .load (test_file_path )
429+ acell = doc .cells [0 ] # type: neuroml.Cell
430+
431+ parameters = acell .get_parameters ()
432+
433+ self .assertEquals (parameters ["id" ], acell .id )
434+ self .assertEquals (
435+ parameters ["ChannelDensity:LeakConductance_pyr_all" ]["erev" ], "-66.0 mV"
436+ )
437+
413438
414439if __name__ == "__main__" :
415440 ta = TestCell ()
You can’t perform that action at this time.
0 commit comments