diff --git a/tests/test_cloud_config.py b/tests/test_cloud_config.py index 7f637f138..8eadf2b7b 100644 --- a/tests/test_cloud_config.py +++ b/tests/test_cloud_config.py @@ -1,6 +1,7 @@ """Tests for the openflight-cloud config module.""" import json +import os import stat import pytest @@ -39,6 +40,9 @@ def test_defaults_endpoint_and_enabled_when_missing(self, tmp_path): class TestSaveConfig: + @pytest.mark.skipif( + os.name == "nt", reason="POSIX permission bits are not representable on Windows" + ) def test_writes_file_with_0600_permissions(self, tmp_path): path = tmp_path / "nested" / "cloud.json" config = cfg.CloudConfig(device_token="tok", device_id="id") diff --git a/tests/test_serial_latency.py b/tests/test_serial_latency.py index cd19232ab..f30bf8ddf 100644 --- a/tests/test_serial_latency.py +++ b/tests/test_serial_latency.py @@ -1,10 +1,16 @@ """Tests for USB serial latency timer diagnostics.""" +import os from pathlib import Path +import pytest + from openflight.serial_latency import read_usb_serial_latency_timer +@pytest.mark.skipif( + os.name == "nt", reason="symlink creation requires elevation on Windows" +) def test_read_usb_serial_latency_timer_resolves_udev_alias(tmp_path: Path): dev_root = tmp_path / "dev" sysfs_root = tmp_path / "sys" / "bus" / "usb-serial" / "devices"