pytest usually captures the output from your tests and the code under test. This includes print statements. The captured output is displayed for failing tests only after the full test session is complete
When you're using "capsys" as a fixture, all print strings are catpured and does not show up on the console. You can use "-s" option to disable this and have all print show up on the console where the test is run.
Share this highlighthttp://www.safaribooksonline.com/a/python-testing-with/20916574/