move to new version

This commit is contained in:
awe
2026-09-17 17:58:36 +03:00
parent e113ef60ab
commit e202f57ef8
16 changed files with 864 additions and 67 deletions
@@ -68,6 +68,18 @@ class GuiProfileCodecTest(unittest.TestCase):
with self.assertRaises(ValueError): # combos_text must be a JSON string, not a number
GuiProfileModel.from_dict({"gui": {"switches": {"combos_text": 123}}})
def test_invalid_gpr_timing_mode_is_rejected(self) -> None:
with self.assertRaisesRegex(ValueError, "timing_mode"):
GuiProfileModel.from_dict({"gui": {"processing": {"gpr": {"timing_mode": "bogus"}}}})
def test_invalid_gpr_plane_mode_is_rejected(self) -> None:
with self.assertRaisesRegex(ValueError, "plane_mode"):
GuiProfileModel.from_dict({"gui": {"processing": {"gpr": {"plane_mode": "bogus"}}}})
def test_invalid_gpr_tx_per_segment_is_rejected(self) -> None:
with self.assertRaisesRegex(ValueError, "tx_per_segment"):
GuiProfileModel.from_dict({"gui": {"processing": {"gpr": {"tx_per_segment": 0}}}})
def test_legacy_gpr_payload_migrates_selected_mode(self) -> None:
# An old payload that selects 'gpr' but carries a legacy root gpr.mode is migrated.
decoded = GuiProfileModel.from_dict({