From b0a8f33e2bc228884dff5c53d118660b9578bcd6 Mon Sep 17 00:00:00 2001 From: Jae Hoon Seo Date: Wed, 18 Nov 2026 18:50:39 +0900 Subject: [PATCH] test: TQ6 pins the documented deviation instead of a 2 % band #35 widened the TQ6 assertion from 1 % to 2 % so that it passed with the new 66 kV screens, while the benchmark row reads FAIL against its registered 1 % band. A 2 % band no longer notices a change of either model within it. The test now pins the documented deviation (-1.47 %, 1.5026 against 1.5251 mm) to 0.1 percentage point; the registered band and the FAIL verdict are unchanged. Signed-off-by: Jae Hoon Seo --- tests/test_torque_balance.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/test_torque_balance.py b/tests/test_torque_balance.py index 568c7b6..4336636 100644 --- a/tests/test_torque_balance.py +++ b/tests/test_torque_balance.py @@ -166,12 +166,14 @@ def test_tq6_solved_template_agrees_with_fixed_radius(template_result): carry load with the cores (the source's Table 3), both models hold them and differ by 1.5 % (FAIL against the band; before, the fixed-radius model left the screens out while the solved section carried them, -0.5 %). - This test guards the documented value. + The band is not widened: the test pins the documented deviation, so a + change of either model in either direction shows here. """ r = template_result - assert r.torque_coefficient_m == pytest.approx( - r.fixed_radius["torque_per_tension_m"], rel=2e-2 - ) + deviation = r.torque_coefficient_m / r.fixed_radius["torque_per_tension_m"] - 1.0 + # Documented in doc/benchmarks.md TQ6 (1.5026 against 1.5251 mm, FAIL + # against the registered 1 % band); the pin lies wholly outside the band. + assert deviation == pytest.approx(-0.0147, abs=1e-3) assert r.ea_fixed_N[-1] == pytest.approx(r.fixed_radius["K_ee_N"], rel=0.06) # Twist opposes the fixed-end torque. assert r.torque_coefficient_m > 0 > r.twist_coefficient_rad_per_N_m