chore: apply linting fixes and expand ruff coverage to test suite
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user