Skip to content

Commit 6db4487

Browse files
committed
tests expect nans
1 parent fb1860b commit 6db4487

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

phylib/io/tests/test_alf.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from ..model import TemplateModel
2121

2222

23+
2324
#------------------------------------------------------------------------------
2425
# Fixture
2526
#------------------------------------------------------------------------------
@@ -246,7 +247,7 @@ def test_merger(dataset):
246247

247248
model = TemplateModel(
248249
dir_path=path, dat_path=dataset.dat_path, sample_rate=2000, n_channels_dat=dataset.nc)
249-
print(model.merge_map)
250+
250251
c = EphysAlfCreator(model)
251252
c.convert(out_path_merge)
252253

@@ -255,9 +256,10 @@ def test_merger(dataset):
255256
clu_new = np.load(next(out_path_merge.glob('clusters.peakToTrough.npy')))
256257
assert clu_old[split_clu] == clu_new[np.max(clu) + 2]
257258
assert clu_old[split_clu] == clu_new[np.max(clu) + 3]
258-
assert clu_new[split_clu] == 0
259-
assert clu_new[merge_clu[0]] == 0
260-
assert clu_new[merge_clu[1]] == 0
259+
260+
assert np.isnan([clu_new[split_clu]])[0]
261+
assert np.isnan([clu_new[merge_clu[0]]])[0]
262+
assert np.isnan([clu_new[merge_clu[1]]])[0]
261263

262264
clu_old = np.load(next(out_path.glob('clusters.channels.npy')))
263265
clu_new = np.load(next(out_path_merge.glob('clusters.channels.npy')))
@@ -271,9 +273,9 @@ def test_merger(dataset):
271273
clu_new = np.load(next(out_path_merge.glob('clusters.depths.npy')))
272274
assert clu_old[split_clu] == clu_new[np.max(clu) + 2]
273275
assert clu_old[split_clu] == clu_new[np.max(clu) + 3]
274-
assert clu_new[split_clu] == 0
275-
assert clu_new[merge_clu[0]] == 0
276-
assert clu_new[merge_clu[1]] == 0
276+
assert np.isnan([clu_new[split_clu]])[0]
277+
assert np.isnan([clu_new[merge_clu[0]]])[0]
278+
assert np.isnan([clu_new[merge_clu[1]]])[0]
277279

278280
clu_old = np.load(next(out_path.glob('clusters.waveformsChannels.npy')))
279281
clu_new = np.load(next(out_path_merge.glob('clusters.waveformsChannels.npy')))

phylib/io/tests/test_model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
# from phylib.utils import Bunch
1616
from phylib.utils.testing import captured_output
17-
# from ..model import from_sparse, load_model
18-
from phylib.io.model import from_sparse, load_model
17+
from ..model import from_sparse, load_model
1918

2019
logger = logging.getLogger(__name__)
2120

0 commit comments

Comments
 (0)