Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9bb351f

Browse files
committed
use logging
1 parent e3f7163 commit 9bb351f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/matplotlib/mathtext.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import os
2323
import types
2424
import unicodedata
25-
import pytest
2625

2726
import numpy as np
2827
from PIL import Image
@@ -866,9 +865,8 @@ def _get_glyph(self, fontname, font_class, sym, fontsize, math=True):
866865
fname = g[0].family_name
867866
if fname in list(BakomaFonts._fontmap.values()):
868867
fname = "Computer Modern"
869-
with pytest.warns(UserWarning) as record:
870-
warnings.warn("Substituting symbol {} "
871-
"from {}".format(sym, fname), UserWarning)
868+
_log.warning("Substituting symbol {} "
869+
"from {}".format(sym, fname))
872870
return g
873871

874872
else:

0 commit comments

Comments
 (0)