Skip to content

Commit

Permalink
coverage bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Feb 18, 2019
1 parent fa52b88 commit c973ae4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def run_test(filename, network):
)
)
traceback_info = []
history = set()
if not test_names:
print("\n{0[error]}WARNING{0}: No test functions in {0[module]}{1}.py{0}".format(color, name))
return [], []
Expand All @@ -119,7 +120,13 @@ def run_test(filename, network):
for c,t in enumerate(test_names, start=1):
network.rpc.revert()
traceback_info += _run_test(module,t,c,len(test_names))
return tx.tx_history.copy(), traceback_info
if sys.argv[1] != "coverage":
continue
# need to retrieve stack trace before reverting the EVM
for i in tx.tx_history:
i.trace
history.update(tx.tx_history.copy())
return history, traceback_info


def main():
Expand Down

0 comments on commit c973ae4

Please sign in to comment.