From ffc7e5b9317ddf7095926c364242b1bfe6459e2e Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Sun, 26 Jan 2025 15:32:16 -0500 Subject: [PATCH] Add changelog entry --- AUTHORS | 1 + changelog/10224.improvement.rst | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 changelog/10224.improvement.rst diff --git a/AUTHORS b/AUTHORS index 9629e00bcfb..f81c87026e3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,6 +24,7 @@ Alice Purcell Allan Feldman Aly Sivji Amir Elkess +Ammar Askar Anatoly Bubenkoff Anders Hovmöller Andras Mitzki diff --git a/changelog/10224.improvement.rst b/changelog/10224.improvement.rst new file mode 100644 index 00000000000..93afe9e2c1e --- /dev/null +++ b/changelog/10224.improvement.rst @@ -0,0 +1,18 @@ +pytest's ``short`` and ``long`` traceback styles (:ref:`how-to-modifying-python-tb-printing`) +now have partial :pep:`657` support and will show specific code segments in the +traceback. + +.. code-block:: pytest + + ================================= FAILURES ================================= + _______________________ test_gets_correct_tracebacks _______________________ + + test_tracebacks.py:12: in test_gets_correct_tracebacks + assert manhattan_distance(p1, p2) == 1 + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + test_tracebacks.py:6: in manhattan_distance + return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y) + ^^^^^^^^^ + E AttributeError: 'NoneType' object has no attribute 'x' + +-- by :user:`ammaraskar`