Orchestrata Ultimate › Tests › Reference › scripts › test_check_lexicon_collisions

Tests reference — tests/scripts/test_check_lexicon_collisions.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_check_lexicon_collisions.py

source · 16 tests · 192 lines

Tests for scripts/check_lexicon_collisions.py — the lexicon/codebase gate.

Kind Name Line Description
class TestSubsystemDiscovery 57
method TestSubsystemDiscovery.test_packages_and_modules_are_both_discovered 58 Directories alone miss two of the five words this gate exists for.
method TestSubsystemDiscovery.test_private_and_dunder_entries_are_excluded 68
method TestSubsystemDiscovery.test_depth_is_capped_at_two 71 Depth 3 was measured and rejected: +183 names, 0 extra catches.
class TestKnownBadWords 78 The acceptance test: every word that reached production and had to be
method TestKnownBadWords.test_reintroducing_a_known_bad_word_is_caught 98
method TestKnownBadWords.test_an_inflected_form_still_collides 109 Stem-blind string matching would miss every one of these: the tree
class TestCurrentLexicon 119
method TestCurrentLexicon.test_the_shipped_lexicon_is_clean 120
method TestCurrentLexicon.test_a_meaningful_number_of_words_is_actually_checked 123 A first cut iterated dict[WorkType, set[str]] at the wrong level and
method TestCurrentLexicon.test_targets_are_not_checked 134 A target word naming a subsystem is the point, not a bug.
class TestExemptions 139
method TestExemptions.test_every_exemption_carries_a_reason 140 An unexplained exemption is how a gate rots into a rubber stamp.
method TestExemptions.test_every_exemption_is_a_live_collision 145 A stale exemption is worse than none — it reads as a documented
method TestExemptions.test_an_exempt_word_does_not_flag 159
class TestExitCodes 166
method TestExitCodes.test_clean_lexicon_exits_zero 167
method TestExitCodes.test_list_mode_exits_zero 170
method TestExitCodes.test_collision_exits_one 173
method TestExitCodes.test_json_mode_reports_the_collision_and_exits_one 178
method TestExitCodes.test_a_gate_that_cannot_run_exits_two_rather_than_passing 183 Silent success on a broken gate is the worst outcome — it reports