Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 29, 2024
1 parent 75c7a83 commit 6f07c30
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/spikeinterface/core/tests/test_core_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
check_paths_relative,
normal_pdf,
convert_string_to_bytes,
add_suffix
add_suffix,
)


Expand All @@ -20,21 +20,23 @@
else:
cache_folder = Path("cache_folder") / "core"


def test_add_suffix():
# first case - no dot provided before extension
file_path = 'testpath'
possible_suffix = ['raw', 'bin', 'path']
file_path = "testpath"
possible_suffix = ["raw", "bin", "path"]
file_path_with_suffix = add_suffix(file_path, possible_suffix)
expected_path = 'testpath.raw'
expected_path = "testpath.raw"
assert str(file_path_with_suffix) == expected_path

# second case - dot provided before extension
file_path = 'testpath'
possible_suffix = ['.raw', '.bin', '.path']
file_path = "testpath"
possible_suffix = [".raw", ".bin", ".path"]
file_path_with_suffix = add_suffix(file_path, possible_suffix)
expected_path = 'testpath.raw'
expected_path = "testpath.raw"
assert str(file_path_with_suffix) == expected_path


def test_path_utils_functions():
if platform.system() != "Windows":
# posix path
Expand Down

0 comments on commit 6f07c30

Please sign in to comment.