use safe_str to serialize Exceptions Fixes #5478

This commit is contained in:
Thomas Grainger
2019-06-25 12:40:07 +01:00
parent 554bff8cc1
commit 013d0e66c7
3 changed files with 8 additions and 2 deletions

View File

@@ -278,3 +278,7 @@ class TestRaises(object):
with pytest.raises(CrappyClass()):
pass
assert "via __class__" in excinfo.value.args[0]
def test_u(self):
with pytest.raises(AssertionError, match=u"\u2603"):
assert False, u"\u2603"