Skip to content

Commit

Permalink
fix coverage for internal functions (#280)
Browse files Browse the repository at this point in the history
the mock wrapper for internal functions would report a file of
`"VyperContract"`. we can ignore these (as soon as they enter into the
actual module, the pc traces should be correct anyway).
  • Loading branch information
charles-cooper authored Aug 12, 2024
1 parent 4d10a59 commit 37d2239
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion boa/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def _valid_frame(self, frame):
def dynamic_source_filename(self, filename, frame):
if not self._valid_frame(frame):
return None
return frame.f_locals["filename"]
ret = frame.f_locals["filename"]
if ret is not None and not ret.endswith(".vy"):
return None
return ret

def has_dynamic_source_filename(self):
return True
Expand Down

0 comments on commit 37d2239

Please sign in to comment.