• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

martineberlein / debugging-benchmark / 7872562145

12 Feb 2024 01:34PM UTC coverage: 0.0% (-82.6%) from 82.589%
7872562145

Pull #25

github

martineberlein
update coverage pipeline
Pull Request #25: Stable

0 of 32 new or added lines in 3 files covered. (0.0%)

0 of 1877 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/debugging_framework/coverage.py
NEW
1
from typing import List, Tuple, Callable, Set
×
2

NEW
3
from fuzzingbook.Coverage import Coverage, Location, BranchCoverage
×
4

NEW
5
from debugging_framework.input import Input
×
6

7

NEW
8
def population_coverage(
×
9
    population: List[Input | str], function: Callable
10
) -> Tuple[Set[Location], List[int]]:
NEW
11
    cumulative_coverage: List[int] = []
×
NEW
12
    all_coverage: Set[Location] = set()
×
13

NEW
14
    for s in population:
×
NEW
15
        with Coverage() as cov:
×
NEW
16
            try:
×
NEW
17
                function(s)
×
NEW
18
            except:
×
NEW
19
                pass
×
NEW
20
        filtered_set = {
×
21
            (func, line)
22
            for (func, line) in cov.coverage()
23
            if "derivation_tree" not in func and "input" not in func
24
        }
NEW
25
        all_coverage |= filtered_set
×
NEW
26
        cumulative_coverage.append(len(all_coverage))
×
27

NEW
28
    return all_coverage, cumulative_coverage
×
29

30

NEW
31
def population_branch_coverage(
×
32
    population: List[Input | str], function: Callable
33
) -> Tuple[Set[Location], List[int]]:
NEW
34
    cumulative_coverage: List[int] = []
×
NEW
35
    all_coverage: Set[Location] = set()
×
36

NEW
37
    for s in population:
×
NEW
38
        with BranchCoverage() as cov:
×
NEW
39
            try:
×
NEW
40
                function(s)
×
NEW
41
            except:
×
NEW
42
                pass
×
NEW
43
        filtered_set = {
×
44
            (x, y)
45
            for (x, y) in cov.coverage()
46
            if "derivation_tree" not in x[0] and y[0] and "input" not in x[0] and y[0]
47
        }
NEW
48
        all_coverage |= filtered_set
×
NEW
49
        cumulative_coverage.append(len(all_coverage))
×
50

NEW
51
    return all_coverage, cumulative_coverage
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc