test: lock release guard inventory order
This commit is contained in:
@@ -653,6 +653,42 @@ class DocumentationConsistencyTests(unittest.TestCase):
|
||||
with self.subTest(stale_value=stale_value):
|
||||
self.assertNotIn(stale_value, active_release_inventory_values)
|
||||
|
||||
def test_training_m52_release_index_guard_inventory_order_and_uniqueness_self_lock(self) -> None:
|
||||
expected_inventory = (
|
||||
"test_training_readmes_expose_m1_m40_release_index_without_raw_test_modules",
|
||||
"test_training_m41_release_index_guard_inventory_is_current",
|
||||
"test_training_m41_release_index_inventory_shape_is_stable",
|
||||
"test_training_m47_release_index_per_doc_helper_inventory_self_lock_is_current",
|
||||
"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_case_product_doc_reflects_current_m40_maturity",
|
||||
)
|
||||
helper_guard_sequence = (
|
||||
"test_training_m47_release_index_per_doc_helper_inventory_self_lock_is_current",
|
||||
"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_case_name = f"{type(self).__module__}.{type(self).__qualname__}"
|
||||
|
||||
self.assertEqual(TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY, expected_inventory)
|
||||
self.assertEqual(
|
||||
len(TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY),
|
||||
len(set(TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY)),
|
||||
)
|
||||
self.assertEqual(
|
||||
TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY[3:7],
|
||||
helper_guard_sequence,
|
||||
)
|
||||
for method_name in TRAINING_M41_RELEASE_INDEX_GUARD_TEST_INVENTORY:
|
||||
with self.subTest(method_name=method_name):
|
||||
loader = unittest.TestLoader()
|
||||
suite = loader.loadTestsFromName(f"{test_case_name}.{method_name}")
|
||||
|
||||
self.assertEqual(loader.errors, [])
|
||||
self.assertEqual(suite.countTestCases(), 1)
|
||||
|
||||
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