Skip to content

Commit cec809d

Browse files
committed
fixes failing test: test_alignments
1 parent f7f47e2 commit cec809d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ibllib/tests/qc/test_alignment_qc.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def test_alignments(self):
169169

170170
def _get_prev_traj_id(self):
171171
traj = one.alyx.get('/trajectories?'
172-
f'&probe_id={self.probe_id}'
172+
f'&probe_insertion={self.probe_id}'
173173
'&provenance=Ephys aligned histology track', clobber=True)
174174
if traj:
175175
self.prev_traj_id = traj[0]['id']
@@ -382,11 +382,12 @@ def _verify(tc, alignment_resolved=None, alignment_count=None,
382382
tc.assertEqual(insertion['json']['extended_qc']['alignment_qc'] < QC_THRESH,
383383
alignment_qc < QC_THRESH)
384384
tc.assertTrue(np.isclose(insertion['json']['extended_qc']['alignment_qc'], alignment_qc))
385-
if tc.prev_traj_id:
386-
traj = one.alyx.get('/trajectories?'
387-
f'&probe_id={tc.probe_id}'
388-
'&provenance=Ephys aligned histology track', clobber=True)
389-
tc.assertNotEqual(tc.prev_traj_id == traj[0]['id'], trajectory_created)
385+
if trajectory_created:
386+
if tc.prev_traj_id:
387+
traj = one.alyx.get('/trajectories?'
388+
f'&probe_insertion={tc.probe_id}'
389+
'&provenance=Ephys aligned histology track', clobber=True)
390+
tc.assertNotEqual(tc.prev_traj_id, traj[0]['id'])
390391
if alignment_date:
391392
tc.assertEqual(insertion['json']['extended_qc']['alignment_resolved_date'], alignment_date)
392393

0 commit comments

Comments
 (0)