Reputation: 28044
Usint pytest on Pycharm, I have some long tests for which I want to be able to manually monitor progress of.
Things like neural network training - I want to see loss and progress bar.
Running the same code from a regular function like main()
gives console output fine.
Running through a pytest test doesn't put anything to console until the test is over.
How to make pytest still output to console in Pycharm?
I found this answer and tried -s
and --capture=tee-sys
which do basically nothing.
Feb 03 2021 Just asked on pycharm's forum.
Upvotes: 3
Views: 1391
Reputation: 5755
add -s
to your Additional Arguments
in the Run/Debug Configuration.
This will disable the default pytest stdout/stderr capturing.
Upvotes: 3