From 1741952b4945776980cef5b6197715cca8862429 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 8 Dec 2023 01:02:07 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/_pytest/assertion/util.py | 2 +- testing/test_assertion.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index 22bedf0b6..7a6613bfd 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -336,7 +336,7 @@ def _compare_eq_iterable( left_formatting, right_formatting = _format_for_empty_and_non_empty(left, right) lines_left = len(left_formatting) lines_right = len(right_formatting) - + if lines_left > 1 or lines_right > 1: _surrounding_parens_on_own_lines(left_formatting) _surrounding_parens_on_own_lines(right_formatting) diff --git a/testing/test_assertion.py b/testing/test_assertion.py index a6bccf3c8..f3e8ae249 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -396,7 +396,7 @@ class TestAssert_reprcompare: "- eggs", "+ spam", ] - + def test_multiline_diff(self) -> None: m1 = [ "This is some dummy test which shows the strange way in which Pycharm" @@ -411,14 +411,14 @@ class TestAssert_reprcompare: "This is some dummy test which shows the strange way in which Pycharm" " displays the full diff.", "This is some dummy test which shows the strange way in which Pycharm" - " displays the full diff." + " displays the full diff.", ] assert callequal(m1, []) == [ "['This is som...e full diff.'] == []", "Left contains one more item: 'This is some dummy test which shows the " "strange way in which Pycharm displays the full diff.'", - 'Use -v to get more diff', + "Use -v to get more diff", ] assert callequal(m1, [], verbose=True) == [ "['This is som...e full diff.'] == []", @@ -429,15 +429,15 @@ class TestAssert_reprcompare: "+ ['This is some dummy test which shows the strange way in which Pycharm " "displays the full diff.']", ] - + assert callequal(m2, []) == [ "['This is som...e full diff.'] == []", "Left contains one more item: 'This is some dummy test which shows the " "strange way in which Pycharm displays the full diff.This is some dummy test " "which shows the strange way in which Pycharm displays the full diff.'", - 'Use -v to get more diff', + "Use -v to get more diff", ] - + assert callequal(m2, [], verbose=True) == [ "['This is som...e full diff.'] == []", "Left contains one more item: 'This is some dummy test which shows the " @@ -449,14 +449,14 @@ class TestAssert_reprcompare: "displays the full diff.This is some dummy test which shows the strange " "way in which Pycharm displays the full diff.']", ] - + assert callequal(m3, []) == [ "['This is som...e full diff.'] == []", "Left contains 2 more items, first extra item: 'This is some dummy test which shows the strange way in " "which Pycharm displays the full diff.'", - 'Use -v to get more diff', + "Use -v to get more diff", ] - + assert callequal(m3, [], verbose=True) == [ "['This is som...e full diff.'] == []", "Left contains 2 more items, first extra item: 'This is some dummy test which shows the strange way in "