@@ -72,19 +72,19 @@ def pytest_assertrepr_compare(config, op, left, right):
7272 half_cols = COLS / 2 - MARGINS
7373 TABSIZE = int (config .getoption ("--tabsize" ) or 2 )
7474
75- pretty_left = pformat (left , indent = 2 , width = half_cols ).splitlines ()
76- pretty_right = pformat (right , indent = 2 , width = half_cols ).splitlines ()
75+ pretty_left = pformat (left , indent = TABSIZE , width = half_cols ).splitlines ()
76+ pretty_right = pformat (right , indent = TABSIZE , width = half_cols ).splitlines ()
7777 diff_cols = COLS - MARGINS
7878
7979 if len (pretty_left ) < 3 or len (pretty_right ) < 3 :
8080 # avoid small diffs far apart by smooshing them up to the left
81- smallest_left = pformat (left , indent = 2 , width = 1 ).splitlines ()
82- smallest_right = pformat (right , indent = 2 , width = 1 ).splitlines ()
81+ smallest_left = pformat (left , indent = TABSIZE , width = 1 ).splitlines ()
82+ smallest_right = pformat (right , indent = TABSIZE , width = 1 ).splitlines ()
8383 max_side = max (len (l ) + 1 for l in smallest_left + smallest_right )
8484 if (max_side * 2 + MARGINS ) < COLS :
8585 diff_cols = max_side * 2 + GUTTER
86- pretty_left = pformat (left , indent = 2 , width = max_side ).splitlines ()
87- pretty_right = pformat (right , indent = 2 , width = max_side ).splitlines ()
86+ pretty_left = pformat (left , indent = TABSIZE , width = max_side ).splitlines ()
87+ pretty_right = pformat (right , indent = TABSIZE , width = max_side ).splitlines ()
8888
8989 differ = icdiff .ConsoleDiff (
9090 cols = diff_cols ,
0 commit comments