Closed jdufresne closed 5 years ago
Another issue with the output, excinfo.value
is not a str
type, it is an Exception
. So even with the pattern converted it still fails. I think the result should be:
assert re.search("My exception message", str(excinfo.value))
@jdufresne This is fixed on develop, just not officially released: https://github.com/pytest-dev/unittest2pytest/pull/24
Thanks!
Example input:
Output:
In the output,
pattern
should be"My exception message"
.This came up in a real life project:
https://github.com/python-pillow/Pillow/blob/7bf5246b93cc89cfb9d6cca78c4719a943b10585/Tests/test_color_lut.py#L40