You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from profilehooks import profile
@profile
def test_something():
...
in a pytest test file and run pytest, I get this failure:
*** PROFILER RESULTS ***
test_search_by_title (/home/mg/Private/tilaajavastuu/bol/server/test/views/test_companies.py:200)
function called 1 times
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File ".../env/lib/python3.8/site-packages/profilehooks.py", line 411, in atexit
self.print_stats()
File ".../env/lib/python3.8/site-packages/profilehooks.py", line 394, in print_stats
stats.print_stats(self.entries)
File "/usr/lib/python3.8/pstats.py", line 369, in print_stats
print(indent, self.total_calls, "function calls", end=' ', file=self.stream)
File ".../env/lib/python3.8/site-packages/_pytest/capture.py", line 415, in write
self.buffer.write(obj)
ValueError: I/O operation on closed file
And if I do @profile(immediate=True), I see nothing at all (because pytest captures it), unless I also use pytest -s.
The text was updated successfully, but these errors were encountered:
if I drop a
in a pytest test file and run pytest, I get this failure:
And if I do
@profile(immediate=True)
, I see nothing at all (because pytest captures it), unless I also usepytest -s
.The text was updated successfully, but these errors were encountered: