I am trying to debug a feature of a test (that runs on pytest)
I am setting a debug point and stop there (using Pycharm)
However, I cannot debug efficiently the code because my stdout and stderr are redirected since this is a pytest. I tried restoring stdout from sys.__stdout__
but sys.stdout = sys.__stdout__
did not work.
Is there any way to restore stdout in order to debug?
This is not a duplicate of python-pytest-capturing-stdout-always-fails, capturing std is not failing in my case, it's captured at a location that is not really helping me to debug...