Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] failing unitests for neo_tools with Neo 0.13.0 #617

Merged
merged 14 commits into from
Mar 22, 2024
6 changes: 1 addition & 5 deletions elephant/spike_train_synchrony.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,7 @@ def delete_synchrofacts(self, threshold, in_place=False, mode='delete'):
# replace link to spiketrain in segment
new_index = self._get_spiketrain_index(
segment.spiketrains, st)
# Todo: Simplify following lines once Neo SpikeTrainList
# implments indexed assignment of entries (i.e., stl[i]=st)
spiketrainlist = list(segment.spiketrains)
spiketrainlist[new_index] = new_st
segment.spiketrains = spiketrainlist
segment.spiketrains[new_index] = new_st
except ValueError:
# st is not in this segment even though it points to it
warnings.warn(f"The SpikeTrain at index {idx} of the "
Expand Down
7 changes: 1 addition & 6 deletions elephant/test/test_neo_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,10 +1167,6 @@ def test__get_all_spiketrains__segment(self):
supported_objects=[neo.core.Segment, neo.core.SpikeTrain])
targ = copy.deepcopy(obj)
obj.spiketrains.append(obj.spiketrains[0])
# TODO: The following is the original line of the test, however, this
# fails with Neo 0.10.0
# Reinstate once issue is fixed
# obj.spiketrains.extend(obj.spiketrains)

res0 = nt.get_all_spiketrains(obj)

Expand Down Expand Up @@ -1320,7 +1316,6 @@ def test__get_all_events__segment(self):
supported_objects=[neo.core.Segment, neo.core.Event])
targ = copy.deepcopy(obj)

obj.events.extend(obj.events)
res0 = nt.get_all_events(obj)

targ = targ.events
Expand Down Expand Up @@ -1469,7 +1464,7 @@ def test__get_all_epochs__segment(self):
obj = generate_one_simple_segment(
supported_objects=[neo.core.Segment, neo.core.Epoch])
targ = copy.deepcopy(obj)
obj.epochs.extend(obj.epochs)

res0 = nt.get_all_epochs(obj)

targ = targ.epochs
Expand Down
Loading