Skip to content

Commit

Permalink
PYMON #2 - Returning memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Sebastien Dieu committed Mar 16, 2020
1 parent 2a9a0e4 commit 6fe68ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_monitor/pytest_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def prof():
m = memory_profiler.memory_usage((wrapped_function, ()), max_usage=True, retval=True)
if isinstance(m[1], BaseException): # Do we have any outcome?
raise m[1]
setattr(pyfuncitem, 'mem_usage', m)
setattr(pyfuncitem, 'mem_usage', m[0])
setattr(pyfuncitem, 'monitor_results', True)
prof()
return True
Expand Down

0 comments on commit 6fe68ca

Please sign in to comment.