@@ -304,7 +304,7 @@ def test_text_angle_font_justify_from_textfile():
304
304
return fig
305
305
306
306
307
- @check_figures_equal ()
307
+ @pytest . mark . mpl_image_compare
308
308
def test_text_transparency ():
309
309
"""
310
310
Add texts with a constant transparency.
@@ -313,17 +313,12 @@ def test_text_transparency():
313
313
y = np .arange (11 , 20 )
314
314
text = [f"TEXT-{ i } -{ j } " for i , j in zip (x , y )]
315
315
316
- fig_ref , fig_test = Figure (), Figure ()
317
- # Use single-character arguments for the reference image
318
- with GMTTempFile () as tmpfile :
319
- np .savetxt (tmpfile .name , np .c_ [x , y , text ], fmt = "%s" )
320
- fig_ref .basemap (R = "0/10/10/20" , J = "X10c" , B = "" )
321
- fig_ref .text (textfiles = tmpfile .name , t = 50 )
316
+ fig = Figure ()
322
317
323
- fig_test .basemap (region = [0 , 10 , 10 , 20 ], projection = "X10c" , frame = True )
324
- fig_test .text (x = x , y = y , text = text , transparency = 50 )
318
+ fig .basemap (region = [0 , 10 , 10 , 20 ], projection = "X10c" , frame = True )
319
+ fig .text (x = x , y = y , text = text , transparency = 50 )
325
320
326
- return fig_ref , fig_test
321
+ return fig
327
322
328
323
329
324
@check_figures_equal ()
0 commit comments