Message console filter¶
BetterPy turns selected Python run-console and test-console output into clickable links, so console text can take you back to the related test, file, or class.
The feature is passive: run tests or Python code normally, then click the highlighted part of a supported console line. If multiple Python classes match the same class name, BetterPy opens a chooser.
Pytest node IDs¶
Pytest node IDs link to the matching test function, method, class, or parametrized test case.
tests/test_orders.py::test_creates_order
tests/test_orders.py::TestCheckout::test_rejects_empty_cart
tests/test_orders.py::test_creates_order[premium-user]
The full node ID is linked. Parametrized IDs may contain nested brackets, quotes, or class reprs:
Pytest short summaries¶
Pytest failure and error summaries link the file or node ID before the - separator.
FAILED tests/test_orders.py::TestCheckout::test_rejects_empty_cart - AssertionError: ...
ERROR tests/test_orders.py::test_creates_order - RuntimeError: ...
FAILED tests/test_orders.py - AttributeError: module 'src.orders' has no attribute 'Order'
When a summary includes only a file path, BetterPy links the file. When it includes a full node ID, BetterPy links the test target.
Python class reprs¶
Python class reprs link the class name inside <class ...> output.
Only the class portion is highlighted, for example HttpAdapter. Nested classes are highlighted from the first class-like segment:
AttributeError object types¶
AttributeError lines that include an object type link the reported class name.
AttributeError: 'GetCephFileSystemsQuery' object has no attribute 'name'
E AttributeError: 'CheckoutService' object has no attribute 'submit'
For these lines, BetterPy highlights the object type itself, such as CheckoutService.
Object reprs¶
Object reprs link the represented object's class.
self = <src.adapters.outbound.http.HttpAdapter object at 0x10bbf0530>
value = <src.domain.orders.OrderCreated object at 0x10b7a7d90>
BetterPy highlights the class name, such as HttpAdapter or OrderCreated.
Exception class lines¶
Pytest traceback exception lines link class-like dotted names after the E prefix.
Names must look class-like, meaning at least one dotted segment starts with an uppercase letter. Plain variable-like names are ignored to avoid false positives.