Skip to content

Commit

Permalink
Improve ParsedCall.__repr__ (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed authored Nov 9, 2019
1 parent d08c96e commit 85e5313
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/_pytest/pytester.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ def __init__(self, name, kwargs):
def __repr__(self):
d = self.__dict__.copy()
del d["_name"]
return "<ParsedCall {!r}(**{!r})>".format(self._name, d)
return "<ParsedCall {}({})".format(
self._name, ", ".join(("{}={!r}".format(k, v)) for k, v in d.items())
)

if False: # TYPE_CHECKING
# The class has undetermined attributes, this tells mypy about it.
Expand Down

0 comments on commit 85e5313

Please sign in to comment.