Orchestrata Ultimate › Tests › Reference › scripts › test_check_req_format
Tests reference — tests/scripts/test_check_req_format.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_check_req_format.py
source · 80 tests · 1014 lines
Tests for scripts/check_req_format.py — the requirement-id format gate,
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestCanonicalGrammar |
63 | Every accepted form in docs/req-id-grammar.md must match CANONICAL. |
| method | TestCanonicalGrammar.test_accepts_grammar_forms |
85 | |
| method | TestCanonicalGrammar.test_rejects_non_grammar |
97 | |
| class | TestPlaceholderExemption |
101 | |
| method | TestPlaceholderExemption.test_shape_placeholders_are_exempt |
102 | |
| method | TestPlaceholderExemption.test_placeholder_regex_does_not_match_real_id |
106 | |
| method | TestPlaceholderExemption.test_nnn_as_substring_is_not_a_placeholder |
109 | |
| class | TestNegativeFixtureExemption |
116 | |
| method | TestNegativeFixtureExemption.test_rejection_sentinels_are_exempt |
117 | |
| method | TestNegativeFixtureExemption.test_a_non_allowlisted_bad_id_still_fails |
123 | |
| class | TestIterFiles |
127 | |
| method | TestIterFiles.test_collects_scanned_suffixes_only |
128 | |
| method | TestIterFiles.test_single_file_root |
136 | |
| method | TestIterFiles.test_nonexistent_root_yields_nothing |
141 | |
| class | TestScan |
145 | |
| method | TestScan.test_counts_non_canonical_only |
146 | |
| method | TestScan.test_structured_ids_are_canonical |
156 | |
| method | TestScan.test_excludes_placeholder_tokens |
166 | |
| method | TestScan.test_mixed_placeholder_and_real |
172 | |
| method | TestScan.test_scan_root_that_does_not_exist |
177 | |
| method | TestScan.test_unreadable_file_skipped_gracefully |
181 | |
| method | TestScan.test_empty_corpus |
192 | |
| class | TestMain |
197 | |
| method | TestMain.test_direct_call_via_sys_argv |
198 | |
| method | TestMain.test_direct_call_fail_path |
212 | |
| method | TestMain.test_direct_call_json_branch |
226 | |
| method | TestMain.test_direct_call_list_branch |
248 | |
| method | TestMain.test_direct_call_story_violation_fails_and_lists |
270 | |
| method | TestMain.test_direct_call_story_violation_json_and_list |
302 | |
| class | TestCLISubprocess |
350 | |
| method | TestCLISubprocess.test_pass_on_clean_fixture |
351 | |
| method | TestCLISubprocess.test_fail_on_dirty_fixture |
357 | |
| method | TestCLISubprocess.test_json_output_shape |
363 | |
| method | TestCLISubprocess.test_json_list_includes_ids |
372 | |
| method | TestCLISubprocess.test_text_list_shows_samples |
378 | |
| method | TestCLISubprocess.test_placeholder_never_fails_the_gate |
384 | |
| method | TestCLISubprocess.test_orchestrata_root_env_override |
393 | |
| method | TestCLISubprocess.test_real_repo_pinned_to_zero |
404 | The oracle this whole normalization exists to satisfy: the live |
| class | TestCrossSpecUniqueness |
411 | Every canonical REQ id must be claimed by exactly one spec's |
| method | TestCrossSpecUniqueness.test_both_registry_shapes_count_but_not_spec_or_tasks_md |
419 | |
| method | TestCrossSpecUniqueness.test_an_id_cited_inside_a_description_is_not_a_declaration |
434 | |
| method | TestCrossSpecUniqueness.test_a_superseded_checkbox_still_declares_its_id |
461 | |
| method | TestCrossSpecUniqueness.test_same_spec_both_shapes_sharing_id_is_not_a_collision |
474 | |
| method | TestCrossSpecUniqueness.test_placeholder_and_sentinel_tokens_are_not_definitions |
485 | |
| method | TestCrossSpecUniqueness.test_collision_across_two_specs_detected_and_named |
490 | |
| method | TestCrossSpecUniqueness.test_collision_across_two_specs_checklists_detected_and_named |
504 | |
| method | TestCrossSpecUniqueness.test_unique_ids_across_specs_pass |
528 | |
| method | TestCrossSpecUniqueness.test_baseline_suppresses_exactly_its_id |
535 | |
| method | TestCrossSpecUniqueness.test_no_specs_root_yields_no_definitions |
554 | |
| method | TestCrossSpecUniqueness.test_unreadable_requirements_md_skipped_gracefully |
558 | |
| method | TestCrossSpecUniqueness.test_module_baseline_is_empty |
571 | |
| method | TestCrossSpecUniqueness.test_live_repo_raw_collisions_is_empty |
581 | |
| method | TestCrossSpecUniqueness.test_live_repo_has_no_unbaselined_collisions |
588 | |
| class | TestCrossSpecUniquenessDirectCall |
595 | Direct sys.argv calls (not subprocess) so coverage instrumentation |
| method | TestCrossSpecUniquenessDirectCall.test_direct_call_collision_fail_text_list |
599 | |
| class | TestCrossSpecUniquenessCLI |
630 | |
| method | TestCrossSpecUniquenessCLI.test_cli_fails_and_names_both_specs |
631 | |
| method | TestCrossSpecUniquenessCLI.test_cli_passes_on_unique_ids |
649 | |
| method | TestCrossSpecUniquenessCLI.test_cli_json_extended_additively |
664 | |
| method | TestCrossSpecUniquenessCLI.test_default_specs_root_is_repo_specs |
687 | |
| class | TestStoryIdx |
705 | |
| method | TestStoryIdx.test_unpadded_and_padded_forms_resolve_identically |
706 | |
| method | TestStoryIdx.test_spec_level_ref_without_seq |
710 | A story reference carrying no sequence still resolves. |
| method | TestStoryIdx.test_non_story_segment_returns_none |
720 | |
| method | TestStoryIdx.test_segment_family_reference_has_no_idx_and_returns_none |
724 | |
| class | TestFindStoryHeadings |
728 | |
| method | TestFindStoryHeadings.test_real_headings_parsed |
729 | |
| method | TestFindStoryHeadings.test_fr_only_spec_yields_empty_not_an_error |
739 | |
| method | TestFindStoryHeadings.test_missing_file_yields_empty |
743 | |
| class | TestSpecDirForNumber |
747 | |
| method | TestSpecDirForNumber.test_single_match_resolved |
748 | |
| method | TestSpecDirForNumber.test_no_match_returns_none |
753 | |
| method | TestSpecDirForNumber.test_ambiguous_match_returns_none |
758 | |
| method | TestSpecDirForNumber.test_missing_specs_root_returns_none |
764 | |
| class | TestCheckStoryExistence |
768 | |
| method | TestCheckStoryExistence.test_id_naming_real_story_passes |
769 | |
| method | TestCheckStoryExistence.test_id_naming_missing_story_fails_naming_id_spec_and_existing |
777 | |
| method | TestCheckStoryExistence.test_unpadded_and_padded_forms_agree_on_the_same_violation |
794 | |
| method | TestCheckStoryExistence.test_fr_only_spec_is_undetermined_not_a_violation |
803 | |
| method | TestCheckStoryExistence.test_missing_spec_dir_is_undetermined_not_a_violation |
811 | |
| method | TestCheckStoryExistence.test_negative_fixture_sentinel_never_checked |
819 | |
| method | TestCheckStoryExistence.test_duplicate_citations_checked_once |
830 | |
| method | TestCheckStoryExistence.test_unreadable_file_skipped_gracefully |
838 | |
| class | TestUnbaselinedStoryViolations |
850 | |
| method | TestUnbaselinedStoryViolations.test_baseline_suppresses_exactly_its_id |
851 | |
| method | TestUnbaselinedStoryViolations.test_module_baseline_is_a_dict_of_reasons |
862 | |
| method | TestUnbaselinedStoryViolations.test_live_repo_has_no_unbaselined_story_violations |
869 | |
| class | TestCountLegacyStoryForms |
878 | |
| method | TestCountLegacyStoryForms.test_legacy_form_counted |
879 | |
| method | TestCountLegacyStoryForms.test_canonical_form_not_counted |
889 | |
| method | TestCountLegacyStoryForms.test_non_story_ids_not_counted |
893 | |
| method | TestCountLegacyStoryForms.test_distinct_ids_only |
897 | |
| method | TestCountLegacyStoryForms.test_unreadable_file_skipped_gracefully |
905 | |
| class | TestStoryExistenceCLI |
915 | |
| method | TestStoryExistenceCLI.test_bogus_story_and_legacy_form_both_fail_in_one_run |
916 | RUL-031 changed what this test asserts. |
| method | TestStoryExistenceCLI.test_json_reports_story_fields |
974 | |
| method | TestStoryExistenceCLI.test_clean_fixture_passes_with_story_and_legacy_reporting |
1004 |