Orchestrata Ultimate › Tests › Reference › scripts › test_generate_pytest_coverage_wave
Tests reference — tests/scripts/test_generate_pytest_coverage_wave.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_generate_pytest_coverage_wave.py
source · 49 tests · 725 lines
Coverage-wave tests for scripts/generate_pytest.py.
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestMethodInfoHelpers |
109 | Pure MethodInfo methods -- no AST pipeline required. |
| method | TestMethodInfoHelpers.test_get_parameter_types_defaults_missing_type_to_any |
112 | |
| method | TestMethodInfoHelpers.test_get_import_path_class_vs_free_function |
120 | |
| method | TestMethodInfoHelpers.test_get_test_prefix_class_vs_free_function |
132 | |
| method | TestMethodInfoHelpers.test_has_type_annotations |
144 | |
| method | TestMethodInfoHelpers.test_get_required_imports_from_defaults_covers_every_marker |
158 | |
| method | TestMethodInfoHelpers.test_inherits_from_pydantic_basemodel_and_baseagent |
175 | |
| method | TestMethodInfoHelpers.test_is_dataclass_and_should_validate_constructor |
188 | should_validate_constructor is False even for dataclasses: |
| method | TestMethodInfoHelpers.test_get_validation_error_imports_only_for_pydantic |
201 | |
| class | TestGetDummyValueBranches |
212 | Every ptype branch of MethodInfo.get_dummy_value. |
| method | TestGetDummyValueBranches.test_default_present_short_circuits |
215 | |
| method | TestGetDummyValueBranches.test_optional_and_none_variants |
220 | |
| method | TestGetDummyValueBranches.test_primitive_types |
226 | |
| method | TestGetDummyValueBranches.test_collection_types |
238 | |
| method | TestGetDummyValueBranches.test_pathlib_type |
254 | Path dummies must never point at a real tree: Path(".") made |
| method | TestGetDummyValueBranches.test_datetime_date_timedelta_types |
262 | |
| method | TestGetDummyValueBranches.test_uuid_type |
279 | |
| method | TestGetDummyValueBranches.test_enum_type_falls_back_to_none |
285 | |
| method | TestGetDummyValueBranches.test_callable_and_coroutine_types |
290 | |
| method | TestGetDummyValueBranches.test_known_orchestrata_class_ctor |
305 | |
| method | TestGetDummyValueBranches.test_known_service_class_falls_back_to_none |
314 | |
| method | TestGetDummyValueBranches.test_unknown_type_falls_back_to_none |
325 | |
| class | TestASTAnalyzerLowLevelStringHelpers |
333 | _type_to_string / _node_to_string / _binop_to_string called directly. |
| method | TestASTAnalyzerLowLevelStringHelpers.test_binop_to_string_all_branches |
336 | |
| method | TestASTAnalyzerLowLevelStringHelpers.test_type_to_string_uses_ast_unparse_when_available |
342 | |
| method | TestASTAnalyzerLowLevelStringHelpers.test_type_to_string_fallback_for_non_ast_input |
347 | |
| method | TestASTAnalyzerLowLevelStringHelpers.test_node_to_string_uses_ast_unparse_when_available |
362 | |
| method | TestASTAnalyzerLowLevelStringHelpers.test_node_to_string_fallback_for_non_ast_input |
367 | |
| class | TestAnalyzeFileErrorPath |
377 | |
| method | TestAnalyzeFileErrorPath.test_syntax_error_returns_empty_list |
378 | |
| class | TestFileToModulePath |
387 | Direct calls -- no file I/O needed, this method only manipulates paths. |
| method | TestFileToModulePath.test_src_directory_is_found_and_stripped |
390 | |
| method | TestFileToModulePath.test_src_directory_with_dotted_child_strips_leading_dots |
397 | |
| method | TestFileToModulePath.test_init_suffix_is_stripped |
410 | |
| method | TestFileToModulePath.test_root_path_with_no_src_collapses_to_module |
417 | |
| method | TestFileToModulePath.test_digit_leading_segment_gets_underscore_prefixed |
425 | |
| class | TestAnalyzeDirectory |
438 | |
| method | TestAnalyzeDirectory.test_skips_test_files_and_tests_directories |
439 | |
| class | TestKitchenSinkAnalysis |
456 | One rich fixture exercising the class-visiting branches together: |
| method | TestKitchenSinkAnalysis.test_dunder_and_private_methods_are_skipped |
463 | |
| method | TestKitchenSinkAnalysis.test_property_and_async_methods_are_extracted |
469 | |
| method | TestKitchenSinkAnalysis.test_varargs_kwonly_and_kwargs_are_extracted |
482 | |
| method | TestKitchenSinkAnalysis.test_module_level_async_function_is_extracted |
494 | |
| method | TestKitchenSinkAnalysis.test_synthetic_init_generated_for_dataclass_and_pydantic_class |
499 | |
| method | TestKitchenSinkAnalysis.test_protocol_with_dotted_base_is_tagged |
518 | |
| method | TestKitchenSinkAnalysis.test_nested_class_does_not_pollute_outer_class_methods |
525 | |
| method | TestKitchenSinkAnalysis.test_base_that_is_neither_name_nor_attribute_is_unparsed |
534 | |
| class | TestGenerateTestFileContentBranches |
553 | Drive _generate_test_file_content with the kitchen-sink methods to |
| method | TestGenerateTestFileContentBranches.test_empty_methods_returns_empty_string |
560 | |
| method | TestGenerateTestFileContentBranches.test_full_generation_produces_parseable_multi_group_imports |
565 | |
| class | TestLintAndFormatGeneratedFiles |
591 | |
| method | TestLintAndFormatGeneratedFiles.test_empty_file_list_returns_immediately |
592 | |
| method | TestLintAndFormatGeneratedFiles.test_missing_cwd_raises_are_caught |
597 | |
| method | TestLintAndFormatGeneratedFiles.test_real_project_root_is_found_and_ruff_black_succeed |
608 | |
| method | TestLintAndFormatGeneratedFiles.test_real_project_root_is_found_and_ruff_black_fail |
635 | |
| class | TestDefaultTemplateDir |
662 | |
| method | TestDefaultTemplateDir.test_none_template_dir_resolves_to_repo_templates |
663 | |
| class | TestMainCliDirectoryAndDefaultTemplateDir |
672 | |
| method | TestMainCliDirectoryAndDefaultTemplateDir.test_main_analyzes_a_directory_source |
673 | |
| method | TestMainCliDirectoryAndDefaultTemplateDir.test_main_without_template_dir_uses_default |
706 |