"""Tests for the pre-registered strength-confirmation sensitivity band.""" from __future__ import annotations from scripts import run_gtl_strength_sensitivity as matrix def test_strength_sensitivity_is_ordered_and_contains_replication_arm(): assert len(matrix.GTL_STRENGTH_ARMS) == 9 assert matrix.GTL_STRENGTH_ARMS[0]["name"] == "control" assert list(matrix.STRENGTH_SCALES) == sorted(matrix.STRENGTH_SCALES) assert "strength_1000_intersection" in { arm["name"] for arm in matrix.GTL_STRENGTH_ARMS } for arm in matrix.GTL_STRENGTH_ARMS[1:]: config = matrix.composition._config(arm) assert config["mode"] == "intersection" assert len(config["confirmations"]) == 1 def test_stable_plateau_requires_adjacent_passing_scales(): arms = [ {"name": "control", "screen": {"advances": False}}, {"name": "strength_625", "screen": {"advances": True}}, {"name": "strength_750", "screen": {"advances": True}}, {"name": "strength_875", "screen": {"advances": False}}, {"name": "strength_1000", "screen": {"advances": True}}, ] assert matrix._stable_plateau_pairs(arms) == [ ["strength_625", "strength_750"] ]