Orchestrata Ultimate › Tests › Reference › test_tools_complexity_analyzer
Tests reference — tests/test_tools_complexity_analyzer.py
Module of tests, split out because the directory page would be too large.
Prose pending.
tests/test_tools_complexity_analyzer.py
source · 21 tests · 230 lines
Unit tests for orchestrata_tools.complexity.analyzer heuristics.
| Kind | Name | Line | Description |
|---|---|---|---|
| class | TestCyclomatic |
65 | Branch-level tests for ComplexityAnalyzer.cyclomatic. |
| method | TestCyclomatic.test_minimal_method_scores_base_one |
68 | |
| method | TestCyclomatic.test_word_boundaries_exclude_keyword_substrings |
73 | |
| method | TestCyclomatic.test_branch_keywords_in_docstring_each_count |
78 | |
| method | TestCyclomatic.test_async_adds_one_branch_point |
84 | |
| method | TestCyclomatic.test_property_adds_one_branch_point |
90 | |
| method | TestCyclomatic.test_parameters_beyond_three_add_decision_points |
96 | |
| method | TestCyclomatic.test_score_is_capped_at_twenty |
101 | |
| class | TestCognitive |
108 | Branch-level tests for ComplexityAnalyzer.cognitive. |
| method | TestCognitive.test_empty_docstring_scores_zero |
111 | |
| method | TestCognitive.test_indentation_depth_contributes_quarter_per_space |
115 | |
| method | TestCognitive.test_branch_keywords_add_cognitive_load |
121 | |
| method | TestCognitive.test_score_is_capped_at_thirty |
129 | |
| class | TestAnalyzeCodebase |
135 | Tests for ComplexityAnalyzer.analyze_codebase. |
| method | TestAnalyzeCodebase.test_empty_codebase_returns_default_report |
138 | |
| method | TestAnalyzeCodebase.test_aggregates_scores_across_methods |
146 | |
| method | TestAnalyzeCodebase.test_god_class_detected_by_method_count |
166 | |
| method | TestAnalyzeCodebase.test_god_class_detected_by_total_complexity |
173 | |
| method | TestAnalyzeCodebase.test_small_simple_class_is_not_a_god_class |
183 | |
| method | TestAnalyzeCodebase.test_god_classes_sorted_by_method_count_descending |
188 | |
| class | TestMostComplexMethods |
196 | Tests for ComplexityAnalyzer.most_complex_methods. |
| method | TestMostComplexMethods.test_returns_methods_sorted_by_complexity_descending |
199 | |
| method | TestMostComplexMethods.test_n_truncates_the_result |
213 | |
| method | TestMostComplexMethods.test_empty_codebase_returns_empty_list |
223 | |
| method | TestMostComplexMethods.test_default_n_is_twenty |
227 |