chore: apply linting fixes and expand ruff coverage to test suite

This commit is contained in:
jack
2026-07-06 15:52:53 -07:00
parent d63332d619
commit 015642eea0
24 changed files with 144 additions and 67 deletions
+9 -1
View File
@@ -1,6 +1,8 @@
import math
import pytest
from pygui.backend.models.frame_stats import compute_stats, Stats
from pygui.backend.models.frame_stats import Stats, compute_stats
def test_basic_stat():
@@ -20,3 +22,9 @@ def test_empty_values_returns_zeros():
def test_ignores_nan():
s = compute_stats([149.0, float("nan"), 151.0])
assert s.min == 149.0 and s.min_index == 0
assert s.max == 151.0 and s.max_index == 2
assert s.diff == pytest.approx(2.0)
assert s.avg == pytest.approx(150.0)
assert s.sigma == pytest.approx(1.0)
assert s.three_sigma == pytest.approx(3.0)