From 10f4117bca86ac6680ca5e5dd4ee5a0f3a05baf5 Mon Sep 17 00:00:00 2001 From: Peter Viskovics <66418513+visko-sc@users.noreply.github.com> Date: Thu, 4 Sep 2025 13:59:23 +0000 Subject: [PATCH] PY-52828: Click to see the difference for assertpy Merge-request: IJ-MR-174413 Merged-by: Egor Eliseev GitOrigin-RevId: fbdd9ffb043f04a33a2cf47b7fa5df3137a5ce6a --- python/helpers/pycharm/teamcity/pytest_plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/helpers/pycharm/teamcity/pytest_plugin.py b/python/helpers/pycharm/teamcity/pytest_plugin.py index 7967e713aefa..2e5ca3775f58 100644 --- a/python/helpers/pycharm/teamcity/pytest_plugin.py +++ b/python/helpers/pycharm/teamcity/pytest_plugin.py @@ -255,6 +255,12 @@ class EchoTeamCityMessages(object): if self.swap_diff: left, right = right, left diff_error = diff_tools.EqualsAssertionError(expected=right, actual=left) + else: + if m := re.search("AssertionError: Expected <(.*)> to .*? <(.*)>, but .*", err_message): + left, right = m.group(1), m.group(2) + if self.swap_diff: + left, right = right, left + diff_error = diff_tools.EqualsAssertionError(expected=right, actual=left) except Exception: pass