Skip to content

Commit

Permalink
make test skipif
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Jun 27, 2024
1 parent 2cc7199 commit 3eee955
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/spikeinterface/core/tests/test_core_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ def test_add_suffix():
assert str(file_path_with_suffix) == expected_path


@pytest.mark.skipif(platform.system() == "Windows", reason="Runs on posix only")
def test_path_utils_functions():
if platform.system() != "Windows":
# posix path
d = {
"kwargs": {
"path": "/yep/sub/path1",
"recording": {
"module": "mock_module",
"class": "mock_class",
"version": "1.2",
"annotations": {},
"kwargs": {"path": "/yep/sub/path2"},
},
}
# posix path
d = {
"kwargs": {
"path": "/yep/sub/path1",
"recording": {
"module": "mock_module",
"class": "mock_class",
"version": "1.2",
"annotations": {},
"kwargs": {"path": "/yep/sub/path2"},
},
}
}

d2 = recursive_path_modifier(d, lambda p: p.replace("/yep", "/yop"))
assert d2["kwargs"]["path"].startswith("/yop")
assert d2["kwargs"]["recording"]["kwargs"]["path"].startswith("/yop")
d2 = recursive_path_modifier(d, lambda p: p.replace("/yep", "/yop"))
assert d2["kwargs"]["path"].startswith("/yop")
assert d2["kwargs"]["recording"]["kwargs"]["path"].startswith("/yop")


@pytest.mark.skipif(platform.system() != "Windows", reason="Runs only on Windows")
Expand Down

0 comments on commit 3eee955

Please sign in to comment.