O'Reilly logo
  • Chris Kang thinks this is interesting:

in​ err

From

Cover of Python Testing with pytest

Note

stderr equality check is done using "in" rather than "==" as in the example above for stdout because we're checking for substring match here rather than full string equivalence assert.