Coverage report: 71%

Files Functions Classes

coverage.py v7.5.3, created at 2024-06-17 07:45 +0200

File function statements missing excluded branches partial coverage
pysource_codegen/__init__.py (no function) 2 0 0 0 0 100%
pysource_codegen/__main__.py run 7 7 0 0 0 0%
pysource_codegen/__main__.py (no function) 5 5 0 2 0 0%
pysource_codegen/_codegen.py all_args 3 1 0 2 1 60%
pysource_codegen/_codegen.py walk_until 9 9 0 8 0 0%
pysource_codegen/_codegen.py walk_function_nodes 20 5 0 22 4 69%
pysource_codegen/_codegen.py use 1 0 0 0 0 100%
pysource_codegen/_codegen.py equal_ast 15 0 0 18 2 94%
pysource_codegen/_codegen.py get_info 34 0 2 16 0 100%
pysource_codegen/_codegen.py only_firstone 6 0 0 6 0 100%
pysource_codegen/_codegen.py unique_by 1 0 0 2 1 67%
pysource_codegen/_codegen.py propability 4 0 0 0 0 100%
pysource_codegen/_codegen.py propability_try 96 17 0 99 13 82%
pysource_codegen/_codegen.py propability_try.inside 9 0 0 10 0 100%
pysource_codegen/_codegen.py propability_try.valid_deco_parents 4 4 0 4 0 0%
pysource_codegen/_codegen.py fix 221 47 0 233 19 77%
pysource_codegen/_codegen.py fix.Transformer.visit_NamedExpr 3 1 0 2 1 60%
pysource_codegen/_codegen.py fix.match_wildcard 4 0 0 6 1 90%
pysource_codegen/_codegen.py fix.names 10 3 0 12 3 64%
pysource_codegen/_codegen.py fix.RemoveName.__init__ 1 0 0 0 0 100%
pysource_codegen/_codegen.py fix.RemoveName.visit_MatchAs 2 0 0 2 1 75%
pysource_codegen/_codegen.py fix.RemoveName.visit_MatchMapping 2 2 0 2 0 0%
pysource_codegen/_codegen.py fix.RemoveNameCleanup.visit_MatchAs 3 0 0 2 0 100%
pysource_codegen/_codegen.py fix.FixPatternNames.__init__ 2 0 0 0 0 100%
pysource_codegen/_codegen.py fix.FixPatternNames.is_allowed 1 0 0 0 0 100%
pysource_codegen/_codegen.py fix.FixPatternNames.visit_MatchAs 5 1 0 4 1 78%
pysource_codegen/_codegen.py fix.FixPatternNames.visit_MatchStar 5 1 0 4 2 67%
pysource_codegen/_codegen.py fix.FixPatternNames.visit_MatchMapping 5 5 0 4 0 0%
pysource_codegen/_codegen.py fix.FixPatternNames.visit_MatchOr 5 0 0 4 0 100%
pysource_codegen/_codegen.py fix.can_literal_eval 5 5 0 0 0 0%
pysource_codegen/_codegen.py fix.cleanup_annotation 5 0 0 0 0 100%
pysource_codegen/_codegen.py fix.cleanup_annotation.Transformer.visit_NamedExpr 3 3 0 2 0 0%
pysource_codegen/_codegen.py fix.cleanup_annotation.Transformer.visit_Yield 5 5 0 4 0 0%
pysource_codegen/_codegen.py fix.cleanup_annotation.Transformer.visit_YieldFrom 3 3 0 2 0 0%
pysource_codegen/_codegen.py fix_result 1 0 0 0 0 100%
pysource_codegen/_codegen.py is_valid_ast 16 0 0 6 0 100%
pysource_codegen/_codegen.py is_valid_ast.is_valid 45 4 0 34 2 92%
pysource_codegen/_codegen.py is_valid_ast.fix_tree 7 0 0 8 0 100%
pysource_codegen/_codegen.py arguments 4 0 0 2 0 100%
pysource_codegen/_codegen.py fix_nonlocal 38 0 0 10 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.__init__ 8 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.name_assigned 2 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_Name 4 0 0 2 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_MatchAs 4 0 0 2 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.search_walrus 3 0 0 4 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_GeneratorExp 3 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_ListComp 3 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_DictComp 3 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_SetComp 3 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_Nonlocal 5 0 0 4 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_Global 5 0 0 4 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_AnnAssign 5 0 0 4 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_FunctionDef 7 0 0 6 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_AsyncFunctionDef 7 0 0 6 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_ClassDef 5 0 0 5 1 90%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_MatchMapping 3 3 0 2 0 0%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_MatchStar 2 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_ExceptHandler 3 1 0 2 1 60%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_Lambda 4 0 0 4 1 88%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_Try 4 0 0 4 0 100%
pysource_codegen/_codegen.py fix_nonlocal.NonLocalFixer.visit_TryStar 4 4 0 4 0 0%
pysource_codegen/_codegen.py fix_nonlocal.FunctionTransformer.__init__ 4 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.FunctionTransformer.visit_FunctionDef 1 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.FunctionTransformer.visit_AsyncFunctionDef 1 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.FunctionTransformer.visit_Lambda 1 0 0 0 0 100%
pysource_codegen/_codegen.py fix_nonlocal.FunctionTransformer.visit_ClassDef 8 0 0 8 1 94%
pysource_codegen/_codegen.py fix_nonlocal.FunctionTransformer.handle_function 9 0 0 10 1 95%
pysource_codegen/_codegen.py min_attr_length 34 1 0 32 1 97%
pysource_codegen/_codegen.py none_allowed 3 1 0 2 1 60%
pysource_codegen/_codegen.py AstGenerator.__init__ 4 4 0 0 0 0%
pysource_codegen/_codegen.py AstGenerator.cnd 1 1 0 0 0 0%
pysource_codegen/_codegen.py AstGenerator.generate 3 3 0 0 0 0%
pysource_codegen/_codegen.py AstGenerator.generate_impl 38 38 2 28 0 0%
pysource_codegen/_codegen.py AstGenerator.generate_impl.attr_length 15 15 0 10 0 0%
pysource_codegen/_codegen.py AstGenerator.generate_impl.child_node 6 6 1 6 0 0%
pysource_codegen/_codegen.py check 4 4 0 4 0 0%
pysource_codegen/_codegen.py generate_ast 7 7 0 2 0 0%
pysource_codegen/_codegen.py generate 2 2 0 0 0 0%
pysource_codegen/_codegen.py ParentRef.__getattr__ 3 3 0 2 0 0%
pysource_codegen/_codegen.py PartialNode.inside 1 0 0 2 1 67%
pysource_codegen/_codegen.py PartialNode.parent 1 1 0 0 0 0%
pysource_codegen/_codegen.py PartialNode.__getattr__ 5 5 0 4 0 0%
pysource_codegen/_codegen.py gen 1 1 0 0 0 0%
pysource_codegen/_codegen.py (no function) 75 0 0 10 0 100%
pysource_codegen/_limits.py calc_f_string_expr_limit 13 0 0 2 0 100%
pysource_codegen/_limits.py calc_f_string_format_limit 10 0 0 0 0 100%
pysource_codegen/_limits.py (no function) 4 0 0 0 0 100%
pysource_codegen/_utils.py only_if 1 0 0 0 0 100%
pysource_codegen/_utils.py ast_dump 1 0 0 0 0 100%
pysource_codegen/_utils.py (no function) 8 0 0 2 0 100%
pysource_codegen/static_type_info.py (no function) 7 0 0 0 0 100%
pysource_codegen/types.py (no function) 18 0 0 6 0 100%
tests/__init__.py (no function) 0 0 0 0 0 100%
tests/conftest.py pytest_addoption 1 0 0 0 0 100%
tests/conftest.py generate 1 1 0 0 0 0%
tests/conftest.py seeds 1 1 0 2 0 0%
tests/conftest.py pytest_sessionfinish 12 10 0 12 1 21%
tests/conftest.py (no function) 9 0 0 0 0 100%
tests/test_fix_nonlocal.py check_code 20 0 1 0 0 100%
tests/test_fix_nonlocal.py test_global_0 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_global_1 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_global_2 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_global_3 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_global_4 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_global_5 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_nonlocal_0 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_nonlocal_1 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_nonlocal_2 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_nonlocal_3 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_nonlocal_4 1 0 0 0 0 100%
tests/test_fix_nonlocal.py test_nonlocal_5 2 0 0 2 0 100%
tests/test_fix_nonlocal.py (no function) 20 0 0 0 0 100%
tests/test_invalid_ast.py does_compile 15 0 0 9 0 100%
tests/test_invalid_ast.py test_invalid_ast 15 1 0 8 1 91%
tests/test_invalid_ast.py x_test_example 4 4 0 0 0 0%
tests/test_invalid_ast.py generate_invalid_ast 35 35 1 6 0 0%
tests/test_invalid_ast.py generate_invalid_ast.checker 4 4 0 2 0 0%
tests/test_invalid_ast.py (no function) 19 0 0 4 0 100%
tests/test_valid_source.py test_valid_source 11 1 0 2 1 85%
tests/test_valid_source.py minimize_if_valid 10 10 0 2 0 0%
tests/test_valid_source.py minimize_if_valid.bug_found 7 7 0 2 0 0%
tests/test_valid_source.py generate_valid_source 21 21 0 6 0 0%
tests/test_valid_source.py generate_valid_source.use 5 5 0 2 0 0%
tests/test_valid_source.py (no function) 49 32 0 16 1 34%
Total   1265 360 7 790 63 71%

No items found using the specified filter.