Unit tests for the neo_tools module.
elephant.test.test_neo_tools.
ExtractNeoAttrsTestCase
(methodName='runTest')[source]¶Bases: unittest.case.TestCase
Methods
assert_dicts_equal
(d1, d2)[source]¶Assert that two dictionaries are equal, taking into account arrays.
Normally, unittest.TestCase.assertEqual doesn’t work with dictionaries containing arrays. This works around that.
Parameters: | d1, d2 : dict
|
---|---|
Returns: | Nothing |
Raises: | AssertionError : If the d1 and d2 are not equal. |
elephant.test.test_neo_tools.
GetAllEpochsTestCase
(methodName='runTest')[source]¶Bases: unittest.case.TestCase
Methods
elephant.test.test_neo_tools.
GetAllEventsTestCase
(methodName='runTest')[source]¶Bases: unittest.case.TestCase
Methods
elephant.test.test_neo_tools.
GetAllObjsTestCase
(methodName='runTest')[source]¶Bases: unittest.case.TestCase
Methods
elephant.test.test_neo_tools.
GetAllSpiketrainsTestCase
(methodName='runTest')[source]¶Bases: unittest.case.TestCase
Methods
elephant.test.test_neo_tools.
strip_iter_values
(targ, array_attrs=[u'waveforms', u'times', u'durations', u'labels', u'index', u'channel_names', u'channel_ids', u'coordinates'])[source]¶Remove iterable, non-string values from a dictionary.
elephant.neo_tools.extract_neo_attrs automatically strips out non-scalar values from attributes. This function does the same to a manually-extracted dictionary.
Parameters: | targ : dict
array_attrs : list of str objects, optional
|
---|---|
Returns: | dict
|
Notes
Always returns a copy, even if nothing was removed.
This function has the values to remove hard-coded. This is intentional to make sure that extract_neo_attrs is removing all the attributes it is supposed to and only the attributes it is supposed to. Please do NOT change this to any sort of automatic detection, if it is missing values please add them manually.