Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cache folder #2927

Merged
merged 83 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 80 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
41462ce
remove the setting of cache folder as global test_core_tools in core/…
paulrignanese May 29, 2024
bddfd92
remove the setting of cache folder as global common_benchmark_testing…
paulrignanese May 29, 2024
7d99d6c
remove the setting of global cache folder as global test_average_acro…
paulrignanese May 29, 2024
b23af98
replace cache_folder creation and global setting with pytest fixtures…
paulrignanese May 29, 2024
cbca727
in progress
paulrignanese May 29, 2024
8a63d06
replace cache folder with pytest fixture for test_motion_extimation …
paulrignanese May 30, 2024
0e47608
remove of useless cache folder for test_motion_interpolation in sorti…
paulrignanese May 30, 2024
d3dcfc8
rename test_NumpyRecording by setup_NumpyRecording as no tests were d…
paulrignanese May 30, 2024
f2b8098
remove useless setting of cache_folder as global variable
paulrignanese May 30, 2024
cfd8eeb
replace cache_folder (study_folder) with pytext fixture for test_grou…
paulrignanese May 30, 2024
00da3a2
replace cache_folder with pytext fixture in new cache_folder_creation…
paulrignanese May 30, 2024
2ee63cb
replace cache_folder with pytext fixture and add new cache_folder_cre…
paulrignanese May 30, 2024
cd8d5eb
replace cache_folder with pytext fixture and add new cache_folder_cre…
paulrignanese May 30, 2024
e3c700e
remove useless setting of cache folder as global variable
paulrignanese May 30, 2024
150c284
remove useless cache folder creation (was commented)
paulrignanese May 30, 2024
d155323
remove useless cache folder creation (was commented)
paulrignanese May 30, 2024
63193dc
replace setting of global cache folder by pytest fixture with new cre…
paulrignanese May 30, 2024
1aaac62
replace setting of cache folder by pytest fixture with new create_cac…
paulrignanese May 30, 2024
2d150a4
replace setting of global cache_folder by pytest fixture with new cre…
paulrignanese May 30, 2024
43651b6
replace setting of cache_folder by pytest fixture with new create_cac…
paulrignanese May 30, 2024
e7d55e1
Merge remote-tracking branch 'origin/main'
paulrignanese May 30, 2024
7be7c66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 30, 2024
0b5fc4a
replace setting of cache_folder by pytest fixture with new create_cac…
paulrignanese May 30, 2024
1e45874
replace setting of cache_folder by pytest fixture with new create_cac…
paulrignanese May 30, 2024
9597b50
replace setting of cache_folder by pytest fixture with new create_cac…
paulrignanese May 30, 2024
8457afd
remove useless setting of cache_folder as global variable for test_cl…
paulrignanese May 30, 2024
391c2d6
replace cache folder import by pytest fixture with new cache_folder_c…
paulrignanese May 30, 2024
d9f22a0
replace cache_folder creation by pytest fixture with new cache_folder…
paulrignanese May 30, 2024
200d4e6
replace cache_folder by pytest fixture with new cache_folder_creation…
paulrignanese May 30, 2024
3953197
replace cache_folder by pytest fixture with new cache_folder_creation…
paulrignanese May 30, 2024
84561cc
remove useless cache_folder for test_widgets.py in widgets/tests/ folder
paulrignanese May 30, 2024
22fc414
replace cache folder with pytest fixture by new create_cache_folder i…
paulrignanese May 30, 2024
75bfc37
replace cache folder with pytest fixture by new create_cache_folder i…
paulrignanese May 30, 2024
ca8d7b0
replace useless cache_folder in test_align_snippets.py in preprocessi…
paulrignanese May 30, 2024
9d6e7d6
replace cache_folder with pytest fixture by new create_cache_folder f…
paulrignanese May 30, 2024
510267b
replace cache_folder with pytest fixture by new create_cache_folder f…
paulrignanese May 30, 2024
2fb265c
replace cache_folder with pytest fixture by new create_cache_folder f…
paulrignanese May 30, 2024
b1a79d4
replace cache_folder with pytest fixture by new create_cache_folder f…
paulrignanese May 30, 2024
e54b58c
replace cache_folder with pytest fixture by new create_cache_folder f…
paulrignanese May 30, 2024
632815a
remove useless cache_folder with pytest fixture for test_quality_met…
paulrignanese May 30, 2024
caa6cec
replace cache_folder by pytest fixture with new create_cache_folder f…
paulrignanese May 30, 2024
c9966d8
replace cache_folder by pytest fixture in setup_module for test_conta…
paulrignanese May 30, 2024
53a7dc6
replace cache_folder by pytest fixture in setup_module for test_hybri…
paulrignanese May 30, 2024
5df78c8
replace cache_folder import from common.py by pytest fixture with new…
paulrignanese May 30, 2024
94ac62c
replace cache_folder import from common.py by pytest fixture with new…
paulrignanese May 30, 2024
7c6dd89
replace cache_folder import from common_benchmark_testing.py by pytes…
paulrignanese May 30, 2024
c57904c
replace cache_folder import from common_benchmark_testing.py by pytes…
paulrignanese May 30, 2024
df8b484
remove useless cache_folder for test_align_sorting.py in postprocessi…
paulrignanese May 30, 2024
8f95f63
replace cache_folder by pytest fixture with new create_cache_folder f…
paulrignanese May 30, 2024
0f91fc2
replace cache_folder by pytest fixture with new create_cache_folder f…
paulrignanese May 30, 2024
9b0bb09
replace cache_folder by pytest fixture with new create_cache_folder f…
paulrignanese May 30, 2024
2f39eaa
removed useless cache_folder_creation and global setting for common.p…
paulrignanese May 30, 2024
84effa8
removed useless cache_folder_creation setting for common.py, test_noi…
paulrignanese May 30, 2024
83d1a1e
replaced cache_folder by pytest fixture with new create_cache_folder …
paulrignanese May 30, 2024
32ff6bc
replaced cache_folder by pytest fixture with new create_cache_folder …
paulrignanese May 30, 2024
496062c
replaced cache_folder by pytest fixture with new create_cache_folder …
paulrignanese May 30, 2024
184b4da
remove useless import (copypaste mistake)
paulrignanese May 30, 2024
9e7c928
Revert "replace cache_folder with pytest fixture by new create_cache_…
paulrignanese May 30, 2024
f02d45b
replace cache_folder by pytest fixture in common_extension_tests.py w…
paulrignanese May 31, 2024
4c75146
removal of a decorator use in debugging that I forgot about
paulrignanese May 31, 2024
30706d4
replace cache_folder by pytest fixture with new create_cache_folder m…
paulrignanese May 31, 2024
c4cd1c2
replace cache_folder by pytest fixture with new create_cache_folder f…
paulrignanese May 31, 2024
84f757f
remove commented cache_folder for test_templatecomparison.py in comar…
paulrignanese May 31, 2024
e0247ad
remove import of cache_folder from common_extension_tests, as it is i…
paulrignanese May 31, 2024
06a4e47
remove useless global setting of cache_folder for test_de
paulrignanese May 31, 2024
17ea159
remove useless global setting of cache_folder for test_filter.py in p…
paulrignanese May 31, 2024
294d331
remove useless global setting of cache_folder for test_normalize_scal…
paulrignanese May 31, 2024
b97b4c9
remove useless global setting of cache_folder for test_rectify.py in …
paulrignanese May 31, 2024
5a00dae
remove commented global setting of cache_folder for test_remove_artif…
paulrignanese May 31, 2024
ab40479
remove useless cache_folder for test_resample.py in preprocessing/tes…
paulrignanese May 31, 2024
78b1290
replace depreciated output_folder by folder in runsorter, and replace…
paulrignanese May 31, 2024
52beb89
replace import of cache_folder from SorterCommonTestSuite as it is no…
paulrignanese May 31, 2024
db53a36
replace depreciated output_folder by folder in runsorter calls, and r…
paulrignanese May 31, 2024
7dca861
replace depreciated output_folder by folder in runsorter calls for te…
paulrignanese May 31, 2024
aaca996
TO DO those three files are the only cache_folder remaining in tests,…
paulrignanese May 31, 2024
bb3f4fc
replace cache_folder by pytest fuxture with new create_cachce_folder …
paulrignanese Jun 3, 2024
b974d88
Fix import conflicts
alejoe91 Jun 5, 2024
3d4f7f2
Fix deepeinteprolation tests
alejoe91 Jun 5, 2024
b52e077
Fix remaining TODOs
alejoe91 Jun 5, 2024
810bce1
Move create_cache_folder to conftest.py and cleanup pytest session st…
alejoe91 Jun 6, 2024
62827ae
Fix scope for test_launcher
alejoe91 Jun 6, 2024
06639f2
Fix deepinterpolation fixtures
alejoe91 Jun 6, 2024
e5ca2a8
Make create_cache_folder module scoped and fix exporters
alejoe91 Jun 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@
"widgets", "exporters", "sortingcomponents", "generation"]


# define global test folder
def pytest_sessionstart(session):
# setup_stuff
pytest.global_test_folder = Path(__file__).parent / "test_folder"
if pytest.global_test_folder.is_dir():
shutil.rmtree(pytest.global_test_folder)
pytest.global_test_folder.mkdir()

for mark_name in mark_names:
(pytest.global_test_folder / mark_name).mkdir()
@pytest.fixture
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulrignanese @JoeZiminski moving the fixture here allows us to remove it from everywhere else, since it's available to the entire pytest session ;)

def create_cache_folder(tmp_path_factory):
cache_folder = tmp_path_factory.mktemp("cache_folder")
return cache_folder

def pytest_collection_modifyitems(config, items):
"""
Expand All @@ -45,12 +39,3 @@ def pytest_collection_modifyitems(config, items):
item.add_marker("sorters")
else:
item.add_marker(module)



def pytest_sessionfinish(session, exitstatus):
# teardown_stuff only if tests passed
# We don't delete the test folder in the CI because it was causing problems with the code coverage.
if exitstatus == 0:
if pytest.global_test_folder.is_dir() and not ON_GITHUB:
shutil.rmtree(pytest.global_test_folder)
17 changes: 6 additions & 11 deletions src/spikeinterface/comparison/tests/test_groundtruthstudy.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@
from spikeinterface.comparison import GroundTruthStudy


if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "comparison"
else:
cache_folder = Path("cache_folder") / "comparison"
cache_folder.mkdir(exist_ok=True, parents=True)

study_folder = cache_folder / "test_groundtruthstudy/"


def setup_module():
@pytest.fixture(scope="module")
def setup_module(tmp_path_factory):
study_folder = tmp_path_factory.mktemp("study_folder")
if study_folder.is_dir():
shutil.rmtree(study_folder)
create_a_study(study_folder)
return study_folder


def simple_preprocess(rec):
Expand Down Expand Up @@ -74,7 +68,8 @@ def create_a_study(study_folder):
# print(study)


def test_GroundTruthStudy():
def test_GroundTruthStudy(setup_module):
study_folder = setup_module
study = GroundTruthStudy(study_folder)
print(study)

Expand Down
17 changes: 8 additions & 9 deletions src/spikeinterface/comparison/tests/test_hybrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@
from spikeinterface.preprocessing import bandpass_filter


if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "comparison" / "hybrid"
else:
cache_folder = Path("cache_folder") / "comparison" / "hybrid"


def setup_module():
@pytest.fixture(scope="module")
def setup_module(tmp_path_factory):
cache_folder = tmp_path_factory.mktemp("cache_folder")
if cache_folder.is_dir():
shutil.rmtree(cache_folder)
cache_folder.mkdir(parents=True, exist_ok=True)
Expand All @@ -31,9 +27,11 @@ def setup_module():
wvf_extractor = extract_waveforms(
recording, sorting, folder=cache_folder / "wvf_extractor", ms_before=10.0, ms_after=10.0
)
return cache_folder


def test_hybrid_units_recording():
def test_hybrid_units_recording(setup_module):
cache_folder = setup_module
wvf_extractor = load_waveforms(cache_folder / "wvf_extractor")
print(wvf_extractor)
print(wvf_extractor.sorting_analyzer)
Expand Down Expand Up @@ -63,7 +61,8 @@ def test_hybrid_units_recording():
check_recordings_equal(hybrid_units_recording, saved_2job, return_scaled=False)


def test_hybrid_spikes_recording():
def test_hybrid_spikes_recording(setup_module):
cache_folder = setup_module
wvf_extractor = load_waveforms(cache_folder / "wvf_extractor")
recording = wvf_extractor.recording
sorting = wvf_extractor.sorting
Expand Down
19 changes: 7 additions & 12 deletions src/spikeinterface/comparison/tests/test_multisortingcomparison.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import shutil
import pytest
from pathlib import Path

import pytest
import numpy as np
Expand All @@ -9,18 +7,14 @@
from spikeinterface.extractors import NumpySorting
from spikeinterface.comparison import compare_multiple_sorters, MultiSortingComparison

if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "comparison"
else:
cache_folder = Path("cache_folder") / "comparison"


multicomparison_folder = cache_folder / "saved_multisorting_comparison"


def setup_module():
@pytest.fixture(scope="module")
def setup_module(tmp_path_factory):
cache_folder = tmp_path_factory.mktemp("cache_folder")
multicomparison_folder = cache_folder / "saved_multisorting_comparison"
if multicomparison_folder.is_dir():
shutil.rmtree(multicomparison_folder)
return multicomparison_folder


def make_sorting(times1, labels1, times2, labels2, times3, labels3):
Expand All @@ -34,7 +28,8 @@ def make_sorting(times1, labels1, times2, labels2, times3, labels3):
return sorting1, sorting2, sorting3


def test_compare_multiple_sorters():
def test_compare_multiple_sorters(setup_module):
multicomparison_folder = setup_module
# simple match
sorting1, sorting2, sorting3 = make_sorting(
[100, 200, 300, 400, 500, 600, 700, 800, 900],
Expand Down
10 changes: 0 additions & 10 deletions src/spikeinterface/comparison/tests/test_templatecomparison.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
import shutil
import pytest
from pathlib import Path
import numpy as np

from spikeinterface.core import create_sorting_analyzer, generate_ground_truth_recording
from spikeinterface.comparison import compare_templates, compare_multiple_templates


# if hasattr(pytest, "global_test_folder"):
# cache_folder = pytest.global_test_folder / "comparison"
# else:
# cache_folder = Path("cache_folder") / "comparison"


# test_dir = cache_folder / "temp_comp_test"


# def setup_module():
# if test_dir.is_dir():
# shutil.rmtree(test_dir)
Expand Down
48 changes: 24 additions & 24 deletions src/spikeinterface/core/tests/test_analyzer_extension_core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from pathlib import Path

import shutil

Expand All @@ -11,13 +10,8 @@

import numpy as np

if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"


def get_sorting_analyzer(format="memory", sparse=True):
def get_sorting_analyzer(cache_folder, format="memory", sparse=True):
recording, sorting = generate_ground_truth_recording(
durations=[30.0],
sampling_frequency=16000.0,
Expand Down Expand Up @@ -53,7 +47,7 @@ def get_sorting_analyzer(format="memory", sparse=True):
return sorting_analyzer


def _check_result_extension(sorting_analyzer, extension_name):
def _check_result_extension(sorting_analyzer, extension_name, cache_folder):
# select unit_ids to several format
for format in ("memory", "binary_folder", "zarr"):
# for format in ("memory", ):
Expand Down Expand Up @@ -83,39 +77,42 @@ def _check_result_extension(sorting_analyzer, extension_name):
False,
],
)
def test_ComputeRandomSpikes(format, sparse):
sorting_analyzer = get_sorting_analyzer(format=format, sparse=sparse)
def test_ComputeRandomSpikes(format, sparse, create_cache_folder):
cache_folder = create_cache_folder
sorting_analyzer = get_sorting_analyzer(cache_folder, format=format, sparse=sparse)

ext = sorting_analyzer.compute("random_spikes", max_spikes_per_unit=10, seed=2205)
indices = ext.data["random_spikes_indices"]
assert indices.size == 10 * sorting_analyzer.sorting.unit_ids.size

_check_result_extension(sorting_analyzer, "random_spikes")
_check_result_extension(sorting_analyzer, "random_spikes", cache_folder)
sorting_analyzer.delete_extension("random_spikes")

ext = sorting_analyzer.compute("random_spikes", method="all")
indices = ext.data["random_spikes_indices"]
assert indices.size == len(sorting_analyzer.sorting.to_spike_vector())

_check_result_extension(sorting_analyzer, "random_spikes")
_check_result_extension(sorting_analyzer, "random_spikes", cache_folder)


@pytest.mark.parametrize("format", ["memory", "binary_folder", "zarr"])
@pytest.mark.parametrize("sparse", [True, False])
def test_ComputeWaveforms(format, sparse):
sorting_analyzer = get_sorting_analyzer(format=format, sparse=sparse)
def test_ComputeWaveforms(format, sparse, create_cache_folder):
cache_folder = create_cache_folder
sorting_analyzer = get_sorting_analyzer(cache_folder, format=format, sparse=sparse)

job_kwargs = dict(n_jobs=2, chunk_duration="1s", progress_bar=True)
sorting_analyzer.compute("random_spikes", max_spikes_per_unit=50, seed=2205)
ext = sorting_analyzer.compute("waveforms", **job_kwargs)
wfs = ext.data["waveforms"]
_check_result_extension(sorting_analyzer, "waveforms")
_check_result_extension(sorting_analyzer, "waveforms", cache_folder)


@pytest.mark.parametrize("format", ["memory", "binary_folder", "zarr"])
@pytest.mark.parametrize("sparse", [True, False])
def test_ComputeTemplates(format, sparse):
sorting_analyzer = get_sorting_analyzer(format=format, sparse=sparse)
def test_ComputeTemplates(format, sparse, create_cache_folder):
cache_folder = create_cache_folder
sorting_analyzer = get_sorting_analyzer(cache_folder, format=format, sparse=sparse)

sorting_analyzer.compute("random_spikes", max_spikes_per_unit=50, seed=2205)

Expand Down Expand Up @@ -187,13 +184,14 @@ def test_ComputeTemplates(format, sparse):
# ax.legend()
# plt.show()

_check_result_extension(sorting_analyzer, "templates")
_check_result_extension(sorting_analyzer, "templates", cache_folder)


@pytest.mark.parametrize("format", ["memory", "binary_folder", "zarr"])
@pytest.mark.parametrize("sparse", [True, False])
def test_ComputeNoiseLevels(format, sparse):
sorting_analyzer = get_sorting_analyzer(format=format, sparse=sparse)
def test_ComputeNoiseLevels(format, sparse, create_cache_folder):
cache_folder = create_cache_folder
sorting_analyzer = get_sorting_analyzer(cache_folder, format=format, sparse=sparse)

sorting_analyzer.compute("noise_levels")
print(sorting_analyzer)
Expand All @@ -212,8 +210,9 @@ def test_get_children_dependencies():
assert rs_children.index("waveforms") < rs_children.index("templates")


def test_delete_on_recompute():
sorting_analyzer = get_sorting_analyzer(format="memory", sparse=False)
def test_delete_on_recompute(create_cache_folder):
cache_folder = create_cache_folder
sorting_analyzer = get_sorting_analyzer(cache_folder, format="memory", sparse=False)
sorting_analyzer.compute("random_spikes")
sorting_analyzer.compute("waveforms")
sorting_analyzer.compute("templates")
Expand All @@ -224,8 +223,9 @@ def test_delete_on_recompute():
assert sorting_analyzer.get_extension("waveforms") is None


def test_compute_several():
sorting_analyzer = get_sorting_analyzer(format="memory", sparse=False)
def test_compute_several(create_cache_folder):
cache_folder = create_cache_folder
sorting_analyzer = get_sorting_analyzer(cache_folder, format="memory", sparse=False)

# should raise an error since waveforms depends on random_spikes, which isn't calculated
with pytest.raises(AssertionError):
Expand Down
9 changes: 2 additions & 7 deletions src/spikeinterface/core/tests/test_baserecording.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@

from spikeinterface.core import generate_recording

if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"
cache_folder.mkdir(exist_ok=True, parents=True)


def test_BaseRecording():
def test_BaseRecording(create_cache_folder):
cache_folder = create_cache_folder
num_seg = 2
num_chan = 3
num_samples = 30
Expand Down
9 changes: 2 additions & 7 deletions src/spikeinterface/core/tests/test_basesnippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@
from spikeinterface.core.npysnippetsextractor import NpySnippetsExtractor
from spikeinterface.core.base import BaseExtractor

if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"
cache_folder.mkdir(exist_ok=True, parents=True)


def test_BaseSnippets():
def test_BaseSnippets(create_cache_folder):
cache_folder = create_cache_folder
duration = [4, 3]
num_channels = 3
nbefore = 20
Expand Down
8 changes: 2 additions & 6 deletions src/spikeinterface/core/tests/test_basesorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@
from spikeinterface.core.testing import check_sorted_arrays_equal, check_sortings_equal
from spikeinterface.core.generate import generate_sorting

if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"


def test_BaseSorting():
def test_BaseSorting(create_cache_folder):
cache_folder = create_cache_folder
num_seg = 2
file_path = cache_folder / "test_BaseSorting.npz"
file_path.parent.mkdir(exist_ok=True)
Expand Down
9 changes: 2 additions & 7 deletions src/spikeinterface/core/tests/test_binaryfolder.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@
from spikeinterface.core import generate_recording


if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"


def test_BinaryFolderRecording():
def test_BinaryFolderRecording(create_cache_folder):
cache_folder = create_cache_folder
rec = generate_recording(num_channels=10, durations=[2.0, 2.0])
folder = cache_folder / "binary_folder_1"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import pytest
import numpy as np
from pathlib import Path

from spikeinterface.core import BinaryRecordingExtractor
from spikeinterface.core.numpyextractors import NumpyRecording

if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"


def test_BinaryRecordingExtractor():
def test_BinaryRecordingExtractor(create_cache_folder):
cache_folder = create_cache_folder
num_seg = 2
num_channels = 3
num_samples = 30
Expand Down
7 changes: 2 additions & 5 deletions src/spikeinterface/core/tests/test_channelslicerecording.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
from spikeinterface.core.generate import generate_recording


def test_ChannelSliceRecording():
if hasattr(pytest, "global_test_folder"):
cache_folder = pytest.global_test_folder / "core"
else:
cache_folder = Path("cache_folder") / "core"
def test_ChannelSliceRecording(create_cache_folder):
cache_folder = create_cache_folder

num_seg = 2
num_chan = 3
Expand Down
Loading
Loading