0

I have a pytest class that looks as following:

class TestModule:

    def test_print(self):
        print("test")

This test only passes without printing anything.

    def test_print(self):
        print("test")
        quit()

This prints test and then raises. Is there a reason for that? How can you print to stdout in pytest?

Yes
  • 339
  • 3
  • 19

1 Answers1

0

Print statements show if you add an -s flag when running it

Yes
  • 339
  • 3
  • 19