File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -637,6 +637,22 @@ def test_alpha_handles():
637
637
assert lh .get_edgecolor ()[:- 1 ] == hh [1 ].get_edgecolor ()[:- 1 ]
638
638
639
639
640
+ @pytest .mark .skipif (
641
+ not mpl .checkdep_usetex (True ),
642
+ reason = "This test needs a TeX installation" )
643
+ def test_usetex_no_warn (caplog ):
644
+ mpl .rcParams ['font.family' ] = 'serif'
645
+ mpl .rcParams ['font.serif' ] = 'Computer Modern'
646
+ mpl .rcParams ['text.usetex' ] = True
647
+
648
+ fig , ax = plt .subplots ()
649
+ ax .plot (0 , 0 , label = 'input' )
650
+ ax .legend (title = "My legend" )
651
+
652
+ fig .canvas .draw ()
653
+ assert "Font family ['serif'] not found." not in caplog .text
654
+
655
+
640
656
def test_warn_big_data_best_loc ():
641
657
fig , ax = plt .subplots ()
642
658
fig .canvas .draw () # So that we can call draw_artist later.
You can’t perform that action at this time.
0 commit comments