RequestHandler: add __repr__ · sysfce2/python-pytest-httpserver@623dfea · GitHub
Skip to content

Commit 623dfea

Browse files
committed
RequestHandler: add __repr__
Add `__repr__` to support pytest's diff view. Such case is when oneshot_handlers are compared with an empty list `[]`. Fixes csernazs#273.
1 parent e32a568 commit 623dfea

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

pytest_httpserver/httpserver.py

Lines changed: 9 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
features:
3+
- |
4+
Add ``__repr__`` to ``RequestHandler`` object so when it is compared (eg. with
5+
the ``log`` attribute of the server) it will show the matcher parameters.

tests/test_permanent.py

Lines changed: 14 additions & 0 deletions

0 commit comments

Comments
 (0)