9
9
GREEN_ON = '\x1b [1;32m'
10
10
ANSI_ESCAPE_RE = re .compile (r'(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]' )
11
11
12
- @pytest .fixture
13
- def with_80_col_terminal ():
14
- # haven't found a better way to simulate terminal sizes
15
- # at a lower level yet sadly.
16
- with mock .patch ("pytest_icdiff.COLS" , 99 ):
17
- yield
18
12
19
13
20
14
def test_short_dict (testdir ):
@@ -202,7 +196,6 @@ def test_a():
202
196
assert drilldown_expression in output
203
197
204
198
205
- @pytest .mark .usefixtures ("with_80_col_terminal" )
206
199
def test_long_lines_in_comparators_are_wrapped_sensibly_multiline (testdir ):
207
200
left = {1 : "hello " * 20 , 2 : 'two' }
208
201
right = {1 : "hella " * 20 , 2 : 'two' }
@@ -217,7 +210,6 @@ def test_one():
217
210
assert comparison_line .count ('hell' ) < 13
218
211
219
212
220
- @pytest .mark .usefixtures ("with_80_col_terminal" )
221
213
def test_long_lines_in_comparators_are_wrapped_sensibly_singleline (testdir ):
222
214
left = "hello " * 10
223
215
right = "hella " * 10
@@ -288,7 +280,6 @@ def test_one():
288
280
assert f"123456 123456{ GREEN_ON } 7" in output
289
281
290
282
291
- @pytest .mark .usefixtures ("with_80_col_terminal" )
292
283
def test_really_long_diffs_use_context_mode (testdir ):
293
284
testdir .makepyfile (
294
285
f"""
@@ -298,6 +289,6 @@ def test_one():
298
289
assert one == two
299
290
"""
300
291
)
301
- output = testdir .runpytest ('-vv' , '--color=yes' ).stdout .str ()
292
+ output = testdir .runpytest ('-vv' , '--color=yes' , '-r=no' ).stdout .str ()
302
293
assert len (output .splitlines ()) < 50
303
294
assert "---" in output # context split marker
0 commit comments