testing.conftest module
- testing.conftest.redirect_stdin()[source]
GPG requires stdin to be open and have real file descriptor, which interferes with pytest’s capture facility. Work around this by redirecting /dev/null to stdin temporarily.
Activate this fixture on unittest test methods and classes by means of: @pytest.mark.usefixtures(“redirect_stdin”).