Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Fix nested markers
Browse files Browse the repository at this point in the history
  • Loading branch information
tthijm committed Jun 12, 2024
1 parent ef468d5 commit 8442a12
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cov/cov.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ def decorator(func: Callable) -> Callable:
return decorator


def mark(branch_id: int, func_name = None) -> None:
if func_name is None:
func_name = inspect.stack()[1].function
def mark(branch_id: int) -> None:
for frame in inspect.stack():
if frame.function in coverages:
coverage = coverages[frame.function]

coverage = coverages[func_name]

coverage.covered_branches[branch_id] = True
coverage.covered_branches[branch_id] = True
break


def print_table() -> None:
Expand Down

0 comments on commit 8442a12

Please sign in to comment.