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?

Niel Godfrey Ponciano
  • 8,708
  • 1
  • 14
  • 29
Yes
  • 181
  • 2
  • 12

1 Answers1

0

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

Yes
  • 181
  • 2
  • 12