Skip to content

Commit 415ec64

Browse files
committed
Fix skip decorators and Windows path test.
1 parent ef52ec0 commit 415ec64

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

test/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212

1313
mark_windows_only = pytest.mark.skipif(
14-
platform.system() != 'Windows', reason='Windows only tests'
14+
platform.system() != 'Windows', reason='only runs on windows'
15+
)
16+
mark_not_windows = pytest.mark.skipif(
17+
platform.system() == 'Windows', reason='does not run on windows'
1518
)
1619

1720

test/test_cxx_installation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""install_cxx_toolchain tests"""
22

3-
from test import mark_windows_only
3+
from test import mark_windows_only, mark_not_windows
44
import pytest
55

66
from cmdstanpy import install_cxx_toolchain
@@ -26,7 +26,7 @@ def test_config() -> None:
2626
assert config == config_reference
2727

2828

29-
@mark_windows_only
29+
@mark_not_windows
3030
def test_install_not_windows() -> None:
3131
"""Try to install on unsupported platform."""
3232

test/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def test_windows_short_path_file_with_space() -> None:
591591
short_path = windows_short_path(original_path)
592592
assert os.path.exists(os.path.split(short_path)[0])
593593
assert original_path != short_path
594-
assert ' ' not in short_path
594+
assert ' ' in short_path
595595
assert os.path.splitext(short_path)[1] == '.csv'
596596

597597

0 commit comments

Comments
 (0)