ghtest.coverage_analysis module

class ghtest.coverage_analysis.BranchAnalyzer(covered_lines: Set[int], missing_lines: Set[int])[source]

Bases: NodeVisitor

check_branch(node: AST) None[source]
is_block_covered(nodes: List[AST]) bool[source]

Check if any line in the block was executed.

visit_If(node: If) None[source]
visit_While(node: While) None[source]
ghtest.coverage_analysis.analyze_file_coverage(filepath: str, cov_data: Any) List[Dict[str, Any]][source]

Analyze a single file to find missed branches using coverage data. Returns a list of missed branch hints.