test: lock bridge diagnostic cluster edge errors
This commit is contained in:
@@ -143,6 +143,7 @@ TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY = (
|
||||
"test_training_m80_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_negative_fixture_self_lock",
|
||||
"test_training_m81_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_self_lock",
|
||||
"test_training_m82_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_rejects_dynamic_sources",
|
||||
"test_training_m83_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_edge_diagnostics_are_locked",
|
||||
"test_training_m53_release_index_doc_category_coverage_is_exact",
|
||||
"test_training_case_product_doc_reflects_current_m40_maturity",
|
||||
)
|
||||
@@ -686,6 +687,9 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
"required_snippet_inventory_source_shape_fixture_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_negative_sources": (
|
||||
"test_training_m82_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_rejects_dynamic_sources"
|
||||
),
|
||||
"required_snippet_inventory_source_shape_fixture_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_edge_diagnostics": (
|
||||
"test_training_m83_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_edge_diagnostics_are_locked"
|
||||
),
|
||||
"per_doc_helper_exact_category_coverage": (
|
||||
"test_training_m53_release_index_doc_category_coverage_is_exact"
|
||||
),
|
||||
@@ -863,6 +867,7 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
"test_training_m80_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_negative_fixture_self_lock",
|
||||
"test_training_m81_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_self_lock",
|
||||
"test_training_m82_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_rejects_dynamic_sources",
|
||||
"test_training_m83_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_edge_diagnostics_are_locked",
|
||||
"test_training_m53_release_index_doc_category_coverage_is_exact",
|
||||
"test_training_case_product_doc_reflects_current_m40_maturity",
|
||||
)
|
||||
@@ -2570,6 +2575,61 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
source
|
||||
)
|
||||
|
||||
def test_training_m83_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_edge_diagnostics_are_locked(
|
||||
self,
|
||||
) -> None:
|
||||
constant_name = (
|
||||
"TRAINING_M41_RELEASE_INDEX_DIAGNOSTIC_FIXTURE_INVENTORY_GUARD_CLUSTER"
|
||||
)
|
||||
guard_name = (
|
||||
"test_training_m83_release_index_source_shape_fixture_guard_methods_constant_exactness_bridge_triplet_diagnostic_fixture_inventory_guard_cluster_constant_source_shape_edge_diagnostics_are_locked"
|
||||
)
|
||||
first_method = "literal_method_alpha"
|
||||
second_method = "literal_method_beta"
|
||||
invalid_sources = {
|
||||
"missing_target_assignment": (
|
||||
"UNRELATED_FIXTURE_GUARD_CLUSTER = ()",
|
||||
"must have one assignment",
|
||||
),
|
||||
"duplicate_top_level_assignments": (
|
||||
f"{constant_name} = ({first_method!r},)\n"
|
||||
f"{constant_name} = ({second_method!r},)",
|
||||
"must have one assignment",
|
||||
),
|
||||
"annotated_assignment": (
|
||||
f"{constant_name}: tuple[str, ...] = ({first_method!r},)",
|
||||
"must be a simple assignment",
|
||||
),
|
||||
"augmented_assignment": (
|
||||
f"{constant_name} += ({first_method!r},)",
|
||||
"must be a simple assignment",
|
||||
),
|
||||
"empty_tuple_assignment": (
|
||||
f"{constant_name} = ()",
|
||||
"must use literal method names",
|
||||
),
|
||||
"integer_literal_method_name": (
|
||||
f"{constant_name} = ({first_method!r}, 123)",
|
||||
"must use literal method names",
|
||||
),
|
||||
"none_literal_method_name": (
|
||||
f"{constant_name} = ({first_method!r}, None)",
|
||||
"must use literal method names",
|
||||
),
|
||||
"scalar_string_assignment": (
|
||||
f"{constant_name} = {first_method!r}",
|
||||
"must be a literal tuple assignment",
|
||||
),
|
||||
}
|
||||
|
||||
self.assertIn(guard_name, TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY)
|
||||
for fixture_name, (source, error_snippet) in invalid_sources.items():
|
||||
with self.subTest(fixture_name=fixture_name):
|
||||
with self.assertRaisesRegex(AssertionError, re.escape(error_snippet)):
|
||||
self._release_index_diagnostic_fixture_inventory_guard_cluster_from_source(
|
||||
source
|
||||
)
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user