Skip to content

Commit

Permalink
Merge pull request #3289 from h-mayorquin/fix_streaming_test
Browse files Browse the repository at this point in the history
Test IBL skip when the setting up the one client fails
  • Loading branch information
alejoe91 authored Aug 6, 2024
2 parents 0b8486b + 21cc1b6 commit 9d6ad5b
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions src/spikeinterface/extractors/tests/test_iblextractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ def setUpClass(cls):
from one.api import ONE

cls.eid = EID
cls.one = ONE(
base_url="https://openalyx.internationalbrainlab.org",
password="international",
silent=True,
cache_dir=None,
)
try:
cls.one = ONE(
base_url="https://openalyx.internationalbrainlab.org",
password="international",
silent=True,
cache_dir=None,
)
except:
pytest.skip("Skipping test due to server being down.")
try:
cls.recording = read_ibl_recording(eid=cls.eid, stream_name="probe00.ap", one=cls.one)
except requests.exceptions.HTTPError as e:
Expand Down Expand Up @@ -109,12 +112,15 @@ def setUpClass(cls):
from one.api import ONE

cls.eid = "e2b845a1-e313-4a08-bc61-a5f662ed295e"
cls.one = ONE(
base_url="https://openalyx.internationalbrainlab.org",
password="international",
silent=True,
cache_dir=None,
)
try:
cls.one = ONE(
base_url="https://openalyx.internationalbrainlab.org",
password="international",
silent=True,
cache_dir=None,
)
except:
pytest.skip("Skipping test due to server being down.")
cls.recording = read_ibl_recording(eid=cls.eid, stream_name="probe00.ap", load_sync_channel=True, one=cls.one)
cls.small_scaled_trace = cls.recording.get_traces(start_frame=5, end_frame=26, return_scaled=True)
cls.small_unscaled_trace = cls.recording.get_traces(
Expand Down Expand Up @@ -182,12 +188,15 @@ def test_ibl_sorting_extractor(self):
"""
from one.api import ONE

one = ONE(
base_url="https://openalyx.internationalbrainlab.org",
password="international",
silent=True,
cache_dir=None,
)
try:
one = ONE(
base_url="https://openalyx.internationalbrainlab.org",
password="international",
silent=True,
cache_dir=None,
)
except:
pytest.skip("Skipping test due to server being down.")
sorting = read_ibl_sorting(pid=PID, one=one)
assert len(sorting.unit_ids) == 733
sorting_good = read_ibl_sorting(pid=PID, good_clusters_only=True)
Expand Down

0 comments on commit 9d6ad5b

Please sign in to comment.