@@ -72,19 +72,19 @@ def pytest_assertrepr_compare(config, op, left, right):
72
72
half_cols = COLS / 2 - MARGINS
73
73
TABSIZE = int (config .getoption ("--tabsize" ) or 2 )
74
74
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 ()
77
77
diff_cols = COLS - MARGINS
78
78
79
79
if len (pretty_left ) < 3 or len (pretty_right ) < 3 :
80
80
# 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 ()
83
83
max_side = max (len (l ) + 1 for l in smallest_left + smallest_right )
84
84
if (max_side * 2 + MARGINS ) < COLS :
85
85
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 ()
88
88
89
89
differ = icdiff .ConsoleDiff (
90
90
cols = diff_cols ,
0 commit comments