Skip to content

Commit

Permalink
Updated Logot.__repr__ for new capturer property (#86)
Browse files Browse the repository at this point in the history
A follow-up to #85
  • Loading branch information
etianen committed Feb 7, 2024
1 parent 328df24 commit bc16c31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logot/_logot.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def _reduce(self, logged: Logged | None) -> Logged | None:
return logged

def __repr__(self) -> str:
return f"Logot(timeout={self.timeout!r}, async_waiter={self.async_waiter!r})"
return f"Logot(capturer={self.capturer!r}, timeout={self.timeout!r}, async_waiter={self.async_waiter!r})"


class Capturer(ABC):
Expand Down
5 changes: 4 additions & 1 deletion tests/test_logot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ def test_clear(logot: Logot) -> None:


def test_repr(logot: Logot) -> None:
assert repr(logot) == "Logot(timeout=3.0, async_waiter=logot.asyncio.AsyncioWaiter)"
assert (
repr(logot)
== "Logot(capturer=logot.logging.LoggingCapturer, timeout=3.0, async_waiter=logot.asyncio.AsyncioWaiter)"
)

0 comments on commit bc16c31

Please sign in to comment.