testing.conftest module

testing.conftest.fake_input()[source]
testing.conftest.pytest_sessionfinish(session, exitstatus)[source]

Called after whole test run finished, right before returning the exit status to the system. Since tests kill duplicity and cause errors intentionally this is necessary to keep a clean test system.

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”).