From cff440613d9b082c5309abcf68494fb1c91fcb83 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 21 Nov 2026 15:20:26 +0100 Subject: [PATCH] fix: scope the citation guard to profile_sync The guard globbed every profiling module, so moving the MAME ref audit into profiling failed it. It now reads the modules profile_sync runs. --- tests/test_profile_sync.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_profile_sync.py b/tests/test_profile_sync.py index 78ccfe7c3..abf5cdd5c 100644 --- a/tests/test_profile_sync.py +++ b/tests/test_profile_sync.py @@ -19,6 +19,7 @@ from unittest import mock import yaml import profile_sync +from tests.sources import script_source from profiling import anchoring from profiling import bump from profiling import citations as profiling_citations @@ -4295,12 +4296,10 @@ class TestCitationSurfaceGuard(unittest.TestCase): A consumer keying on the field name reopens the gap this closes: citations outside its list rot while the pin advances. The walker matches the key once. Everything else goes through the collector. + The audits beside it in profiling (mamerefs reads MAME driver refs) + advance no pin and are not read here. """ - cli = Path(profile_sync.__file__) - source = "".join( - path.read_text(encoding="utf-8") - for path in [cli, *sorted((cli.parent / "profiling").glob("*.py"))] - ) + source = script_source("profile_sync.py") self.assertNotIn('.get("source_ref")', source) self.assertEqual(source.count('== "source_ref"'), 1)