diff --git a/src/spikeinterface/comparison/tests/test_templatecomparison.py b/src/spikeinterface/comparison/tests/test_templatecomparison.py index adffb258d6..f4b3a14f0d 100644 --- a/src/spikeinterface/comparison/tests/test_templatecomparison.py +++ b/src/spikeinterface/comparison/tests/test_templatecomparison.py @@ -3,8 +3,7 @@ from pathlib import Path import numpy as np -from spikeinterface.core import create_sorting_analyzer -from spikeinterface.extractors import toy_example +from spikeinterface.core import create_sorting_analyzer, generate_ground_truth_recording from spikeinterface.comparison import compare_templates, compare_multiple_templates @@ -27,9 +26,7 @@ def test_compare_multiple_templates(): duration = 60 num_channels = 8 - rec, sort = toy_example(duration=duration, num_segments=1, num_channels=num_channels) - # rec = rec.save(folder=test_dir / "rec") - # sort = sort.save(folder=test_dir / "sort") + rec, sort = generate_ground_truth_recording(durations=[duration], num_channels=num_channels) # split recording in 3 equal slices fs = rec.get_sampling_frequency() diff --git a/src/spikeinterface/extractors/tests/test_mdaextractors.py b/src/spikeinterface/extractors/tests/test_mdaextractors.py index 8c8bc0aa8c..6440e575d5 100644 --- a/src/spikeinterface/extractors/tests/test_mdaextractors.py +++ b/src/spikeinterface/extractors/tests/test_mdaextractors.py @@ -1,7 +1,8 @@ import pytest from pathlib import Path from spikeinterface.core.testing import check_recordings_equal, check_sortings_equal -from spikeinterface.extractors import toy_example, MdaRecordingExtractor, MdaSortingExtractor +from spikeinterface.core import generate_ground_truth_recording +from spikeinterface.extractors import MdaRecordingExtractor, MdaSortingExtractor if hasattr(pytest, "global_test_folder"): cache_folder = pytest.global_test_folder / "extractors" @@ -10,7 +11,7 @@ def test_mda_extractors(): - rec, sort = toy_example(num_segments=1, num_units=10) + rec, sort = generate_ground_truth_recording(durations=[10.0], num_units=10) MdaRecordingExtractor.write_recording(rec, cache_folder / "mdatest") rec_mda = MdaRecordingExtractor(cache_folder / "mdatest") diff --git a/src/spikeinterface/extractors/tests/test_shybridextractors.py b/src/spikeinterface/extractors/tests/test_shybridextractors.py index eed64bdbba..a0164fd119 100644 --- a/src/spikeinterface/extractors/tests/test_shybridextractors.py +++ b/src/spikeinterface/extractors/tests/test_shybridextractors.py @@ -1,7 +1,8 @@ import pytest from pathlib import Path +from spikeinterface.core import generate_ground_truth_recording from spikeinterface.core.testing import check_recordings_equal, check_sortings_equal -from spikeinterface.extractors import toy_example, SHYBRIDRecordingExtractor, SHYBRIDSortingExtractor +from spikeinterface.extractors import SHYBRIDRecordingExtractor, SHYBRIDSortingExtractor if hasattr(pytest, "global_test_folder"): cache_folder = pytest.global_test_folder / "extractors" @@ -11,7 +12,7 @@ @pytest.mark.skipif(True, reason="SHYBRID only tested locally") def test_shybrid_extractors(): - rec, sort = toy_example(num_segments=1, num_units=10) + rec, sort = generate_ground_truth_recording(durations=[10.0], num_units=10) SHYBRIDSortingExtractor.write_sorting(sort, cache_folder / "shybridtest") sort_shybrid = SHYBRIDSortingExtractor( diff --git a/src/spikeinterface/preprocessing/tests/test_motion.py b/src/spikeinterface/preprocessing/tests/test_motion.py index 7cea531bb4..ea4611b372 100644 --- a/src/spikeinterface/preprocessing/tests/test_motion.py +++ b/src/spikeinterface/preprocessing/tests/test_motion.py @@ -3,11 +3,10 @@ import shutil +from spikeinterface.core import generate_recording from spikeinterface.preprocessing import correct_motion, load_motion_info -from spikeinterface.extractors import toy_example - import numpy as np if hasattr(pytest, "global_test_folder"): @@ -19,7 +18,8 @@ def test_estimate_and_correct_motion(): - rec, sorting = toy_example(num_segments=1, duration=30.0, num_units=10, num_channels=12) + rec = generate_recording(durations=[30.0], num_channels=12) + print(rec) folder = cache_folder / "estimate_and_correct_motion" diff --git a/src/spikeinterface/qualitymetrics/tests/test_metrics_functions.py b/src/spikeinterface/qualitymetrics/tests/test_metrics_functions.py index 79fbab8893..88908d05c5 100644 --- a/src/spikeinterface/qualitymetrics/tests/test_metrics_functions.py +++ b/src/spikeinterface/qualitymetrics/tests/test_metrics_functions.py @@ -11,7 +11,6 @@ synthesize_random_firings, ) -# from spikeinterface.extractors.toy_example import toy_example from spikeinterface.qualitymetrics.utils import create_ground_truth_pc_distributions from spikeinterface.qualitymetrics import calculate_pc_metrics