Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="simple_coverage",
version="0.3.0",
version="0.3.1",
author="Nikolai Limbrunner",
author_email="nikolai.limbrunner@gmail.com",
description="Simple Coverage measurements for Python",
Expand Down
6 changes: 4 additions & 2 deletions simple_coverage/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ def save_coverage_output(func_name, instructions_dict, called_instructions):

# check if function already exists
if func_name in data:
# append called instructions to existing function
data[func_name]["called_instructions"].extend(called_instructions)
# append new called instructions to existing function
for instruction in called_instructions:
if instruction not in data[func_name]["called_instructions"]:
data[func_name]["called_instructions"].append(instruction)
else:
# otherwise create new entry for new function
data.update(
Expand Down