lawsynth/python/lawsynth-notebook/tests/test_uncertainty_view.py
2026-08-16 22:04:11 +03:00

10 lines
386 B
Python

import pytest
from lawsynth_notebook.errors import ArtifactValidationError
from lawsynth_notebook.uncertainty_view import normalize_intervals
def test_uncertainty_rejects_inverted_interval():
assert normalize_intervals({"k": {"lower": 1, "upper": 2}})[0]["mean"] == 1.5
with pytest.raises(ArtifactValidationError):
normalize_intervals({"k": {"lower": 2, "upper": 1}})