test: lock release snippet category shape
This commit is contained in:
@@ -115,6 +115,7 @@ TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY = (
|
||||
"test_training_m48_release_index_per_doc_helper_keeps_doc_tuple_shape",
|
||||
"test_training_m49_release_index_per_doc_helper_handles_empty_docs_without_mutation",
|
||||
"test_training_m50_release_index_helper_accepts_flattened_inventory_complete_doc",
|
||||
"test_training_m54_release_index_required_snippet_inventory_category_shape_is_locked",
|
||||
"test_training_m53_release_index_doc_category_coverage_is_exact",
|
||||
"test_training_case_product_doc_reflects_current_m40_maturity",
|
||||
)
|
||||
@@ -523,6 +524,9 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
"per_doc_helper_flattened_complete_doc": (
|
||||
"test_training_m50_release_index_helper_accepts_flattened_inventory_complete_doc"
|
||||
),
|
||||
"required_snippet_inventory_category_shape": (
|
||||
"test_training_m54_release_index_required_snippet_inventory_category_shape_is_locked"
|
||||
),
|
||||
"per_doc_helper_exact_category_coverage": (
|
||||
"test_training_m53_release_index_doc_category_coverage_is_exact"
|
||||
),
|
||||
@@ -666,6 +670,7 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
"test_training_m48_release_index_per_doc_helper_keeps_doc_tuple_shape",
|
||||
"test_training_m49_release_index_per_doc_helper_handles_empty_docs_without_mutation",
|
||||
"test_training_m50_release_index_helper_accepts_flattened_inventory_complete_doc",
|
||||
"test_training_m54_release_index_required_snippet_inventory_category_shape_is_locked",
|
||||
"test_training_m53_release_index_doc_category_coverage_is_exact",
|
||||
"test_training_case_product_doc_reflects_current_m40_maturity",
|
||||
)
|
||||
@@ -788,6 +793,36 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
self.assertEqual(len(flattened_required_snippets), len(set(flattened_required_snippets)))
|
||||
self.assertEqual(missing_by_doc, {"synthetic-complete-release.md": ()})
|
||||
|
||||
def test_training_m54_release_index_required_snippet_inventory_category_shape_is_locked(self) -> None:
|
||||
inventory = TRAINING_M41_RELEASE_INDEX_REQUIRED_SNIPPET_INVENTORY
|
||||
expected_categories = (
|
||||
"current_m1_m40_marker",
|
||||
"acceptance_offline_validation",
|
||||
"public_api_privacy_contracts",
|
||||
"package_smoke_offline_registry",
|
||||
"dashboard_public_docs_privacy",
|
||||
"single_set_docker_deployment",
|
||||
"docker_smoke_guard_coverage",
|
||||
)
|
||||
flattened_snippets = tuple(
|
||||
snippet
|
||||
for category in expected_categories
|
||||
for snippet in inventory[category]
|
||||
)
|
||||
|
||||
self.assertEqual(tuple(inventory), expected_categories)
|
||||
self.assertEqual(len(expected_categories), len(set(expected_categories)))
|
||||
for category in expected_categories:
|
||||
with self.subTest(category=category):
|
||||
snippets = inventory[category]
|
||||
self.assertTrue(snippets)
|
||||
for snippet in snippets:
|
||||
self.assertIsInstance(snippet, str)
|
||||
self.assertNotEqual(snippet, "")
|
||||
|
||||
self.assertEqual(TRAINING_M41_RELEASE_INDEX_DOC_SNIPPETS, flattened_snippets)
|
||||
self.assertEqual(len(flattened_snippets), len(set(flattened_snippets)))
|
||||
|
||||
def test_training_m53_release_index_doc_category_coverage_is_exact(self) -> None:
|
||||
inventory = TRAINING_M41_RELEASE_INDEX_REQUIRED_SNIPPET_INVENTORY
|
||||
expected_categories = tuple(inventory)
|
||||
|
||||
Reference in New Issue
Block a user