Orchestrata Ultimate › Tests › Reference › scripts › test_gen_codebase_map

Tests reference — tests/scripts/test_gen_codebase_map.py

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

Prose pending.

tests/scripts/test_gen_codebase_map.py

source · 30 tests · 473 lines

Tests for scripts/gen_codebase_map.py — the injected-context generator.

Covers: core.atomic_json

Kind Name Line Description
class TestSplitBases 74 _split_bases must be depth-aware — the whole point of not using split(',').
method TestSplitBases.test_no_bases 77
method TestSplitBases.test_single_base 80
method TestSplitBases.test_two_bases 83
method TestSplitBases.test_subscripted_base_is_not_torn_in_two 86 A naive split(',') yields ['Mapping[str', 'int]'] — both bogus.
method TestSplitBases.test_subscripted_base_beside_a_plain_one 92
method TestSplitBases.test_keyword_arguments_are_not_bases 98 metaclass= is not a base class.
class TestBaseKey 103
method TestBaseKey.test_bare_name 104
method TestBaseKey.test_qualified_name_is_reduced_to_the_class 107
method TestBaseKey.test_subscript_is_stripped 110
class TestClassMapSection 114
method TestClassMapSection.test_section_is_present 115
method TestClassMapSection.test_class_map_carries_the_symbols_whose_absence_caused_the_2026_08_12_failure 118 THE regression guard. Each of these was needed to design a change
method TestClassMapSection.test_covers_src_beyond_orchestrata_ultimate 136 orchestrata_ast sits beside orchestrata_ultimate and holds the AST
method TestClassMapSection.test_bases_are_carried_not_just_names 141 class Foo(Bar) is the extension signal; Foo alone is not.
method TestClassMapSection.test_extension_points_are_marked 145 A class others subclass carries ★N. BaseTool is the tool framework's
method TestClassMapSection.test_methods_are_excluded 157 Methods are ~64% of symbols and carry almost no extension signal.
class TestDeterminism 171
method TestDeterminism.test_two_builds_are_byte_identical 172 The map is regenerated every session; nondeterministic ordering would
class TestResilience 189
method TestResilience.test_map_still_builds_when_the_toolkit_cannot_load 190 The class map is an enrichment. If the AST toolkit cannot be loaded,
class TestFullMap 220
method TestFullMap.test_header_and_sections_follow_the_hook_order 221
method TestFullMap.test_a_section_is_byte_identical_to_the_cli 243
method TestFullMap.test_guard_keeps_the_existing_file_below_1000_signatures 271
method TestFullMap.test_guard_reports_unavailable_when_there_is_no_file 283
method TestFullMap.test_guard_writes_at_1000_signatures 293
class TestMapCache 302 _MapCache is the per-file cache that makes --with-full ~15x faster
method TestMapCache.test_cold_rows_equal_toolkit_and_warm_reload_parses_nothing 326
method TestMapCache.test_kind_filter_matches_class_rows_of_the_toolkit 342
method TestMapCache.test_doc_equals_first_doc_line_cold_and_warm 351
method TestMapCache.test_changed_content_is_reparsed_not_served_stale 370
method TestMapCache.test_version_mismatch_starts_empty_and_rewrites_current_version 393
method TestMapCache.test_damaged_cache_loads_empty_and_still_gives_correct_rows 417
method TestMapCache.test_save_prunes_unused_entries_and_skips_rewrite_when_unchanged 431
method TestMapCache.test_missing_path_yields_none_and_empty_doc_and_is_not_saved 460