0

Is it possible to put multiple assert statements into 1 pytest function and have pytest report all the failures?

I.e. instead of having to run this:

def test_1_dne_2():
    assert 1 != 2

def test_2_dne_1():
    assert 2 != 1

I want to do

def test_dnes():
    assert 1 != 2
    assert 2 != 1

and have pytest report any and all asserts that fail.

I am using pycharm, for what it's worth.

Thanks!

Python Developer
  • 407
  • 1
  • 7
  • 18

0 Answers0