From 58b17f2fc35739c3c8ee746b6d212e1cbedbbc80 Mon Sep 17 00:00:00 2001 From: yuqei Date: Fri, 1 May 2026 05:19:58 -0400 Subject: [PATCH] test: lock bridge duplicate guard fixture --- tests/unit/test_documentation_consistency.py | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tests/unit/test_documentation_consistency.py b/tests/unit/test_documentation_consistency.py index 890ffc5..34bc4a7 100644 --- a/tests/unit/test_documentation_consistency.py +++ b/tests/unit/test_documentation_consistency.py @@ -129,6 +129,7 @@ TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY = ( "test_training_m65_release_index_source_shape_fixture_guard_methods_constant_inventory_exactness_self_lock", "test_training_m66_release_index_source_shape_fixture_guard_methods_constant_source_exactness_self_lock", "test_training_m67_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_self_lock", + "test_training_m69_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_duplicate_negative_fixture_self_lock", "test_training_m53_release_index_doc_category_coverage_is_exact", "test_training_case_product_doc_reflects_current_m40_maturity", ) @@ -618,6 +619,9 @@ class DocumentationConsistencyTests(unittest.TestCase): "required_snippet_inventory_source_shape_fixture_constant_exactness_bridge": ( "test_training_m67_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_self_lock" ), + "required_snippet_inventory_source_shape_fixture_constant_exactness_bridge_duplicate_negative_fixture": ( + "test_training_m69_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_duplicate_negative_fixture_self_lock" + ), "per_doc_helper_exact_category_coverage": ( "test_training_m53_release_index_doc_category_coverage_is_exact" ), @@ -781,6 +785,7 @@ class DocumentationConsistencyTests(unittest.TestCase): "test_training_m65_release_index_source_shape_fixture_guard_methods_constant_inventory_exactness_self_lock", "test_training_m66_release_index_source_shape_fixture_guard_methods_constant_source_exactness_self_lock", "test_training_m67_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_self_lock", + "test_training_m69_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_duplicate_negative_fixture_self_lock", "test_training_m53_release_index_doc_category_coverage_is_exact", "test_training_case_product_doc_reflects_current_m40_maturity", ) @@ -1225,6 +1230,43 @@ class DocumentationConsistencyTests(unittest.TestCase): exactness_bridge_guard_names, ) + def test_training_m69_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_duplicate_negative_fixture_self_lock( + self, + ) -> None: + inventory_exactness_guard = ( + "test_training_m65_release_index_source_shape_fixture_guard_methods_constant_inventory_exactness_self_lock" + ) + source_exactness_guard = ( + "test_training_m66_release_index_source_shape_fixture_guard_methods_constant_source_exactness_self_lock" + ) + bridge_exactness_guard = ( + "test_training_m67_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_self_lock" + ) + guard_name = ( + "test_training_m69_release_index_source_shape_fixture_guard_methods_constant_inventory_source_exactness_bridge_duplicate_negative_fixture_self_lock" + ) + exactness_bridge_guard_names = ( + inventory_exactness_guard, + source_exactness_guard, + bridge_exactness_guard, + ) + synthetic_duplicate_inventory = ( + *TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY, + bridge_exactness_guard, + ) + exact_once_counts = tuple( + synthetic_duplicate_inventory.count(method_name) + for method_name in exactness_bridge_guard_names + ) + + self.assertIn(guard_name, TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY) + self.assertEqual( + synthetic_duplicate_inventory[:-1], + TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY, + ) + self.assertNotEqual(exact_once_counts, (1, 1, 1)) + self.assertEqual(exact_once_counts, (1, 1, 2)) + def test_training_m47_release_index_per_doc_helper_inventory_self_lock_is_current(self) -> None: helper_name = "_release_index_missing_required_snippets_by_doc" docs_guard_name = "test_training_readmes_expose_m1_m40_release_index_without_raw_test_modules"