Skip to content

Commit

Permalink
Fixes neo_tools unit tests to work with Neo 0.10.0+ (#446)
Browse files Browse the repository at this point in the history
* First fix for unittests missing fake_neo objects

* Fixed all GetAllObjsTestCase unit tests

* Started work on Events test case

* Fixed Events test case

* Fixed Epochs and Spiketrain tests

* Starting to fix ExtractNeoAttrs

* 7 more failing tests for ExtractNeoAttrs

* All neo_tools tests fixed for Neo 0.10

* Enabled dataset generators from neo 0.10.0

* This PR adds SpikeTrainList as output of `get_all_spiketrains()``

* Use SpikeTrainList, work around SpikeTrainList.extend() bug.

* Fix pandas_bridge tests to work without fake_neo()

* PEP8 Line length corrections

* More PEP8 finishes

* Yet more PEP8 finishes

* Last PEP8 finish

* Update elephant/neo_tools.py
  • Loading branch information
mdenker authored Mar 14, 2022
1 parent 5be9d7f commit 854a5ca
Show file tree
Hide file tree
Showing 3 changed files with 1,087 additions and 573 deletions.
5 changes: 3 additions & 2 deletions elephant/neo_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from itertools import chain

from neo.core.spiketrainlist import SpikeTrainList
from neo.core.container import unique_objs
from elephant.utils import deprecated_alias

Expand Down Expand Up @@ -180,10 +181,10 @@ def get_all_spiketrains(container):
Returns
-------
list
A list of the unique `neo.SpikeTrain` objects in `container`.
A `neo.SpikeTrainList` object of the unique `neo.SpikeTrain` objects in `container`.
"""
return _get_all_objs(container, 'SpikeTrain')
return SpikeTrainList(_get_all_objs(container, 'SpikeTrain'))


def get_all_events(container):
Expand Down
Loading

0 comments on commit 854a5ca

Please sign in to comment.