Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions tests/test_cloud_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Tests for the openflight-cloud config module."""

import json
import os
import stat

import pytest
Expand Down Expand Up @@ -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")
Expand Down
6 changes: 6 additions & 0 deletions tests/test_serial_latency.py
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading