Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5037eef commit bb0786bCopy full SHA for bb0786b
1 file changed
lib/matplotlib/tests/test_legend.py
@@ -637,6 +637,22 @@ def test_alpha_handles():
637
assert lh.get_edgecolor()[:-1] == hh[1].get_edgecolor()[:-1]
638
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
656
def test_warn_big_data_best_loc():
657
fig, ax = plt.subplots()
658
fig.canvas.draw() # So that we can call draw_artist later.
0 commit comments