From 6f83418c4c940d63889c4a7cfcf14a3286e18af3 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 21 Jul 2026 10:18:09 +0000 Subject: [PATCH] =?UTF-8?q?Type-clean=20the=20anomaly=20check=20tests=20?= =?UTF-8?q?=F0=9F=9F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/scripts/test_audit_anomalies.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/scripts/test_audit_anomalies.py b/tests/scripts/test_audit_anomalies.py index 07ba6d2bc..86d7889b1 100644 --- a/tests/scripts/test_audit_anomalies.py +++ b/tests/scripts/test_audit_anomalies.py @@ -1,16 +1,18 @@ import dataclasses from typing import Optional -import pytest - +# The checks are registry-driven: production reaches them through `_REGISTRY`, +# never by name, so the underscore marks "not a direct call site" rather than +# "untestable". Naming them here is the only way to exercise one check in +# isolation, hence the private-usage waivers. from scripts.audit.anomalies import ( - _REGISTRY, + _REGISTRY, # pyright: ignore[reportPrivateUsage] PropertyAudit, Severity, - _already_meets_goal_with_works, - _effective_lodged_divergence, - _implausible_lodged_score, - _plan_stops_short_of_goal, + _already_meets_goal_with_works, # pyright: ignore[reportPrivateUsage] + _effective_lodged_divergence, # pyright: ignore[reportPrivateUsage] + _implausible_lodged_score, # pyright: ignore[reportPrivateUsage] + _plan_stops_short_of_goal, # pyright: ignore[reportPrivateUsage] )