Skip to content

Commit cf400cd

Browse files
authored
Merge pull request #240 from jhlegarreta/sty/use-local-random-generator
TST: Use a local random generator in spike identification test
2 parents 6a6deca + e353bbd commit cf400cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_analysis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ def test_identify_bland_altman_salient_data():
144144
assert len(salient_data[BASalientEntity.RIGHT_MASK.value]) == len(_data1)
145145

146146

147-
def test_identify_spikes(request):
148-
rng = request.node.rng
147+
def test_identify_spikes():
148+
rng = np.random.default_rng(1234)
149149

150150
n_samples = 450
151151

152152
fd = rng.normal(0, 5, n_samples)
153153
threshold = 2.0
154154

155-
expected_indices = np.asarray([42, 48, 61, 80, 98, 103, 113, 143, 324, 387, 422, 436, 449])
155+
expected_indices = np.asarray([5, 57, 85, 100, 127, 180, 191, 202, 335, 393, 409])
156156
expected_mask = np.zeros(n_samples, dtype=bool)
157157
expected_mask[expected_indices] = True
158158

0 commit comments

Comments
 (0)