@@ -457,7 +457,7 @@ def test_autoscale_tiny_range():
457
457
ax .plot ([0 , 1 ], [1 , 1 + y1 ])
458
458
459
459
460
- @pytest . mark . style ('default' )
460
+ @mpl . style . context ('default' )
461
461
def test_autoscale_tight ():
462
462
fig , ax = plt .subplots (1 , 1 )
463
463
ax .plot ([1 , 2 , 3 , 4 ])
@@ -467,7 +467,7 @@ def test_autoscale_tight():
467
467
assert_allclose (ax .get_ylim (), (1.0 , 4.0 ))
468
468
469
469
470
- @pytest . mark . style ('default' )
470
+ @mpl . style . context ('default' )
471
471
def test_autoscale_log_shared ():
472
472
# related to github #7587
473
473
# array starts at zero to trigger _minpos handling
@@ -485,7 +485,7 @@ def test_autoscale_log_shared():
485
485
assert_allclose (ax2 .get_ylim (), (x [0 ], x [- 1 ]))
486
486
487
487
488
- @pytest . mark . style ('default' )
488
+ @mpl . style . context ('default' )
489
489
def test_use_sticky_edges ():
490
490
fig , ax = plt .subplots ()
491
491
ax .imshow ([[0 , 1 ], [2 , 3 ]], origin = 'lower' )
@@ -822,7 +822,7 @@ def test_nonfinite_limits():
822
822
ax .plot (x , y )
823
823
824
824
825
- @pytest . mark . style ('default' )
825
+ @mpl . style . context ('default' )
826
826
@pytest .mark .parametrize ('plot_fun' ,
827
827
['scatter' , 'plot' , 'fill_between' ])
828
828
@check_figures_equal (extensions = ["png" ])
@@ -1696,8 +1696,8 @@ def test_bar_pandas_indexed(pd):
1696
1696
ax .bar (df .x , 1. , width = df .width )
1697
1697
1698
1698
1699
+ @mpl .style .context ('default' )
1699
1700
@check_figures_equal ()
1700
- @pytest .mark .style ('default' )
1701
1701
def test_bar_hatches (fig_test , fig_ref ):
1702
1702
ax_test = fig_test .subplots ()
1703
1703
ax_ref = fig_ref .subplots ()
@@ -2190,7 +2190,7 @@ def test_scatter_unfilled(self):
2190
2190
[0.5 , 0.5 , 0.5 , 1 ]])
2191
2191
assert_array_equal (coll .get_linewidths (), [1.1 , 1.2 , 1.3 ])
2192
2192
2193
- @pytest . mark . style ('default' )
2193
+ @mpl . style . context ('default' )
2194
2194
def test_scatter_unfillable (self ):
2195
2195
coll = plt .scatter ([0 , 1 , 2 ], [1 , 3 , 2 ], c = ['0.1' , '0.3' , '0.5' ],
2196
2196
marker = 'x' ,
@@ -2340,7 +2340,7 @@ def get_next_color():
2340
2340
c = c_case , edgecolors = "black" , kwargs = {}, xsize = xsize ,
2341
2341
get_next_color_func = get_next_color )
2342
2342
2343
- @pytest . mark . style ('default' )
2343
+ @mpl . style . context ('default' )
2344
2344
@check_figures_equal (extensions = ["png" ])
2345
2345
def test_scatter_single_color_c (self , fig_test , fig_ref ):
2346
2346
rgb = [[1 , 0.5 , 0.05 ]]
@@ -5575,7 +5575,7 @@ def test_loglog_nonpos():
5575
5575
ax .set_yscale ("log" , nonpositive = mcy )
5576
5576
5577
5577
5578
- @pytest . mark . style ('default' )
5578
+ @mpl . style . context ('default' )
5579
5579
def test_axes_margins ():
5580
5580
fig , ax = plt .subplots ()
5581
5581
ax .plot ([0 , 1 , 2 , 3 ])
@@ -6060,7 +6060,7 @@ def test_tick_param_label_rotation():
6060
6060
assert text .get_rotation () == 35
6061
6061
6062
6062
6063
- @pytest . mark . style ('default' )
6063
+ @mpl . style . context ('default' )
6064
6064
def test_fillbetween_cycle ():
6065
6065
fig , ax = plt .subplots ()
6066
6066
@@ -6878,7 +6878,7 @@ def test_polar_interpolation_steps_variable_r(fig_test, fig_ref):
6878
6878
np .linspace (0 , np .pi / 2 , 101 ), np .linspace (1 , 2 , 101 ))
6879
6879
6880
6880
6881
- @pytest . mark . style ('default' )
6881
+ @mpl . style . context ('default' )
6882
6882
def test_autoscale_tiny_sticky ():
6883
6883
fig , ax = plt .subplots ()
6884
6884
ax .bar (0 , 1e-9 )
@@ -6908,7 +6908,7 @@ def test_ytickcolor_is_not_yticklabelcolor():
6908
6908
6909
6909
@pytest .mark .parametrize ('size' , [size for size in mfont_manager .font_scalings
6910
6910
if size is not None ] + [8 , 10 , 12 ])
6911
- @pytest . mark . style ('default' )
6911
+ @mpl . style . context ('default' )
6912
6912
def test_relative_ticklabel_sizes (size ):
6913
6913
mpl .rcParams ['xtick.labelsize' ] = size
6914
6914
mpl .rcParams ['ytick.labelsize' ] = size
@@ -7066,7 +7066,7 @@ def test_patch_bounds(): # PR 19078
7066
7066
np .array ((- 0.525 , - (bot + 0.05 ), 1.05 , bot + 0.1 )), ax .dataLim .bounds , 16 )
7067
7067
7068
7068
7069
- @pytest . mark . style ('default' )
7069
+ @mpl . style . context ('default' )
7070
7070
def test_warn_ignored_scatter_kwargs ():
7071
7071
with pytest .warns (UserWarning ,
7072
7072
match = r"You passed a edgecolor/edgecolors" ):
0 commit comments