@@ -457,7 +457,7 @@ def test_autoscale_tiny_range():
457457 ax .plot ([0 , 1 ], [1 , 1 + y1 ])
458458
459459
460- @pytest . mark . style ('default' )
460+ @mpl . style . context ('default' )
461461def test_autoscale_tight ():
462462 fig , ax = plt .subplots (1 , 1 )
463463 ax .plot ([1 , 2 , 3 , 4 ])
@@ -467,7 +467,7 @@ def test_autoscale_tight():
467467 assert_allclose (ax .get_ylim (), (1.0 , 4.0 ))
468468
469469
470- @pytest . mark . style ('default' )
470+ @mpl . style . context ('default' )
471471def test_autoscale_log_shared ():
472472 # related to github #7587
473473 # array starts at zero to trigger _minpos handling
@@ -485,7 +485,7 @@ def test_autoscale_log_shared():
485485 assert_allclose (ax2 .get_ylim (), (x [0 ], x [- 1 ]))
486486
487487
488- @pytest . mark . style ('default' )
488+ @mpl . style . context ('default' )
489489def test_use_sticky_edges ():
490490 fig , ax = plt .subplots ()
491491 ax .imshow ([[0 , 1 ], [2 , 3 ]], origin = 'lower' )
@@ -822,7 +822,7 @@ def test_nonfinite_limits():
822822 ax .plot (x , y )
823823
824824
825- @pytest . mark . style ('default' )
825+ @mpl . style . context ('default' )
826826@pytest .mark .parametrize ('plot_fun' ,
827827 ['scatter' , 'plot' , 'fill_between' ])
828828@check_figures_equal (extensions = ["png" ])
@@ -1696,8 +1696,8 @@ def test_bar_pandas_indexed(pd):
16961696 ax .bar (df .x , 1. , width = df .width )
16971697
16981698
1699+ @mpl .style .context ('default' )
16991700@check_figures_equal ()
1700- @pytest .mark .style ('default' )
17011701def test_bar_hatches (fig_test , fig_ref ):
17021702 ax_test = fig_test .subplots ()
17031703 ax_ref = fig_ref .subplots ()
@@ -2190,7 +2190,7 @@ def test_scatter_unfilled(self):
21902190 [0.5 , 0.5 , 0.5 , 1 ]])
21912191 assert_array_equal (coll .get_linewidths (), [1.1 , 1.2 , 1.3 ])
21922192
2193- @pytest . mark . style ('default' )
2193+ @mpl . style . context ('default' )
21942194 def test_scatter_unfillable (self ):
21952195 coll = plt .scatter ([0 , 1 , 2 ], [1 , 3 , 2 ], c = ['0.1' , '0.3' , '0.5' ],
21962196 marker = 'x' ,
@@ -2340,7 +2340,7 @@ def get_next_color():
23402340 c = c_case , edgecolors = "black" , kwargs = {}, xsize = xsize ,
23412341 get_next_color_func = get_next_color )
23422342
2343- @pytest . mark . style ('default' )
2343+ @mpl . style . context ('default' )
23442344 @check_figures_equal (extensions = ["png" ])
23452345 def test_scatter_single_color_c (self , fig_test , fig_ref ):
23462346 rgb = [[1 , 0.5 , 0.05 ]]
@@ -5575,7 +5575,7 @@ def test_loglog_nonpos():
55755575 ax .set_yscale ("log" , nonpositive = mcy )
55765576
55775577
5578- @pytest . mark . style ('default' )
5578+ @mpl . style . context ('default' )
55795579def test_axes_margins ():
55805580 fig , ax = plt .subplots ()
55815581 ax .plot ([0 , 1 , 2 , 3 ])
@@ -6060,7 +6060,7 @@ def test_tick_param_label_rotation():
60606060 assert text .get_rotation () == 35
60616061
60626062
6063- @pytest . mark . style ('default' )
6063+ @mpl . style . context ('default' )
60646064def test_fillbetween_cycle ():
60656065 fig , ax = plt .subplots ()
60666066
@@ -6878,7 +6878,7 @@ def test_polar_interpolation_steps_variable_r(fig_test, fig_ref):
68786878 np .linspace (0 , np .pi / 2 , 101 ), np .linspace (1 , 2 , 101 ))
68796879
68806880
6881- @pytest . mark . style ('default' )
6881+ @mpl . style . context ('default' )
68826882def test_autoscale_tiny_sticky ():
68836883 fig , ax = plt .subplots ()
68846884 ax .bar (0 , 1e-9 )
@@ -6908,7 +6908,7 @@ def test_ytickcolor_is_not_yticklabelcolor():
69086908
69096909@pytest .mark .parametrize ('size' , [size for size in mfont_manager .font_scalings
69106910 if size is not None ] + [8 , 10 , 12 ])
6911- @pytest . mark . style ('default' )
6911+ @mpl . style . context ('default' )
69126912def test_relative_ticklabel_sizes (size ):
69136913 mpl .rcParams ['xtick.labelsize' ] = size
69146914 mpl .rcParams ['ytick.labelsize' ] = size
@@ -7066,7 +7066,7 @@ def test_patch_bounds(): # PR 19078
70667066 np .array ((- 0.525 , - (bot + 0.05 ), 1.05 , bot + 0.1 )), ax .dataLim .bounds , 16 )
70677067
70687068
7069- @pytest . mark . style ('default' )
7069+ @mpl . style . context ('default' )
70707070def test_warn_ignored_scatter_kwargs ():
70717071 with pytest .warns (UserWarning ,
70727072 match = r"You passed a edgecolor/edgecolors" ):
0 commit comments