Skip to content

Commit 241d818

Browse files
Update src/_pytest/raises.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
1 parent 6312268 commit 241d818

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_pytest/raises.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,9 @@ def __exit__(
705705
if not self.expected_exceptions:
706706
fail("DID NOT RAISE any exception")
707707
if len(self.expected_exceptions) == 1:
708-
fail(f"DID NOT RAISE {self.expected_exceptions[0].__name__!r}")
708+
fail(f"DID NOT RAISE {self.expected_exceptions[0].__name__}")
709709
else:
710-
names = ", ".join(f"{x.__name__!r}" for x in self.expected_exceptions)
710+
names = ", ".join(x.__name__ for x in self.expected_exceptions)
711711
fail(f"DID NOT RAISE any of ({names})")
712712

713713
assert self.excinfo is not None, (

0 commit comments

Comments
 (0)