Skip to content

Commit

Permalink
keeping logic where a non-mock object may have < > surrounding the …
Browse files Browse the repository at this point in the history
…str output whereby we dont need to add another.
  • Loading branch information
bandophahita committed Apr 2, 2024
1 parent 2447448 commit 7fa025e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions screenpy/speech_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ def represent_prop(item: str | T | mock.Mock) -> str | mock.Mock:
if isinstance(item, str):
return repr(item)

description = str(item)
if description[:1] == "<" and description[-1:] == ">":
return description

return f"<{item}>"

0 comments on commit 7fa025e

Please sign in to comment.