Orchestrata Ultimate › Tests › Reference › test_orchestrata_tools_diagram_to_code
Tests reference — tests/test_orchestrata_tools_diagram_to_code.py
Module of tests, split out because the directory page would be too large.
Prose pending.
tests/test_orchestrata_tools_diagram_to_code.py
source · 62 tests · 775 lines
Behavioural tests for orchestrata_tools.diagram.diagram_to_code.
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_class_name_to_filename_acronym_boundary |
32 | |
| function | test_class_name_to_filename_simple_camel |
38 | |
| function | test_class_name_to_filename_already_snake |
42 | |
| function | test_mermaid_type_to_python_single_generic |
49 | |
| function | test_mermaid_type_to_python_multi_arg_generic |
53 | |
| function | test_mermaid_type_to_python_empty_string |
57 | |
| function | test_mermaid_type_to_python_no_tildes |
61 | |
| function | test_split_params_respects_nested_brackets |
68 | |
| function | test_split_params_empty_string |
73 | |
| function | test_split_on_first_eq_top_level |
80 | |
| function | test_split_on_first_eq_ignores_nested_eq |
84 | |
| function | test_split_on_first_eq_skips_bracketed_default |
89 | |
| function | test_extract_type_references_from_vars_and_methods |
97 | |
| function | test_extract_type_references_empty_when_no_annotations |
119 | |
| function | test_parse_namespace_block |
130 | |
| function | test_parse_class_outside_namespace_has_empty_namespace |
144 | |
| function | test_parse_class_stereotype_on_header |
155 | |
| function | test_parse_class_multiple_stereotypes |
161 | |
| function | test_parse_class_body_decorator_line |
170 | |
| function | test_parse_separator_line_is_ignored |
181 | |
| function | test_parse_async_abstract_method_with_return_type |
198 | |
| function | test_parse_method_return_type_with_arrow_prefix_stripped |
215 | |
| function | test_parse_method_flags_classmethod_staticmethod_property |
224 | |
| function | test_parse_method_no_params_no_return |
245 | |
| function | test_parse_class_variable_with_annotation_and_default |
257 | |
| function | test_parse_class_variable_no_annotation_no_default |
268 | |
| function | test_parse_class_variable_generic_annotation_converted |
279 | |
| function | test_parse_relationship_creates_placeholder_classes_not_in_result |
291 | |
| function | test_parse_relationship_direct_creates_missing_classes |
302 | |
| function | test_parse_relationship_direct_composition_and_aggregation |
311 | |
| function | test_generate_imports_enum |
324 | |
| function | test_generate_imports_dataclass_decorator |
335 | |
| function | test_generate_imports_pydantic_base_model |
345 | |
| function | test_generate_imports_abstract_base_class |
355 | |
| function | test_generate_imports_protocol_from_implements |
373 | |
| function | test_generate_imports_typing_generics_from_params_and_return |
382 | |
| function | test_generate_imports_classvar |
404 | |
| function | test_generate_imports_stdlib_types_from_annotations |
413 | |
| function | test_generate_imports_asyncio_for_async_method_regression |
432 | Regression test: async methods must pull in import asyncio. |
| function | test_generate_code_per_module_groups_by_namespace |
456 | |
| function | test_generate_code_per_module_without_imports |
470 | |
| function | test_generate_code_include_imports_false |
481 | |
| function | test_generate_class_docstring_lists_relationships |
493 | |
| function | test_generate_class_empty_body_gets_pass |
510 | |
| function | test_generate_method_instance_method_gets_self |
524 | |
| function | test_generate_method_classmethod_gets_cls |
533 | |
| function | test_generate_method_staticmethod_gets_no_self_or_cls |
544 | |
| function | test_generate_method_param_with_default_and_type |
557 | |
| function | test_generate_method_body_is_ellipsis |
566 | |
| function | test_generate_method_with_manual_decorator |
578 | |
| function | test_write_modules_creates_files_for_flat_namespace |
605 | |
| function | test_write_modules_enums_go_to_types_module |
651 | |
| function | test_write_modules_nested_namespace_creates_intermediate_packages |
664 | |
| function | test_write_modules_no_namespace_uses_scaffold_dir |
685 | |
| function | test_split_params_and_return_nested_call_in_default |
700 | |
| function | test_split_params_and_return_missing_close_paren |
712 | |
| function | test_split_params_and_return_colon_form_return_type |
718 | |
| function | test_parse_params_sig_skips_empty_parts |
729 | |
| function | test_parse_params_sig_varargs_and_kwargs |
734 | |
| function | test_parse_method_param_without_type_annotation |
742 | |
| function | test_generate_code_per_module_includes_imports_when_needed |
753 | |
| function | test_generate_class_skips_decorator_matching_base_class_stereotype |
767 |