From 7e477ac23d426def89e945484e036920b781ac68 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Mon, 23 Oct 2023 19:43:37 +0100 Subject: [PATCH] fixup! fixup! Color the full diff that pytest shows as a diff --- src/_pytest/assertion/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index 14e2fa7ea..b9123c97d 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -197,7 +197,7 @@ def assertrepr_compare( try: if op == "==": writer = config.get_terminal_writer() - explanation = _compare_eq_any(left, right, writer, verbose) + explanation = _compare_eq_any(left, right, writer._highlight, verbose) elif op == "not in": if istext(left) and istext(right): explanation = _notin_text(left, right, verbose)