Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Nov 22, 2024
1 parent 91c8a84 commit 807e771
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ def test_empty_units(sorting_analyzer_simple):
# num_spikes are ints not nans so we confirm empty units are nans for everything except
# num_spikes which should be 0
nan_containing_columns = [column for column in metrics_empty.columns if column != "num_spikes"]
for empty_unit_id in sorting_empty.get_empty_unit_ids():
for empty_unit_ids in sorting_empty.get_empty_unit_ids():
from pandas import isnull

assert np.all(isnull(metrics_empty.loc[empty_unit_id, nan_containing_columns].values))
assert np.all(isnull(metrics_empty.loc[empty_unit_ids, nan_containing_columns].values))
if "num_spikes" in metrics_empty.columns:
assert metrics_empty.loc[empty_unit_id, ["num_spikes"]] == 0
assert sum(metrics_empty.loc[empty_unit_ids, ["num_spikes"]]) == 0


# TODO @alessio all theses old test should be moved in test_metric_functions.py or test_pca_metrics()
Expand Down

0 comments on commit 807e771

Please sign in to comment.