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

Skip to content

Commit 4426c60

Browse files
committed
Remove fallback test
1 parent 4fe4a7c commit 4426c60

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

lib/matplotlib/tests/test_agg.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010

1111
from matplotlib import (
12-
collections, path, pyplot as plt, transforms as mtransforms, rcParams,
13-
font_manager as fm
14-
)
12+
collections, path, pyplot as plt, transforms as mtransforms, rcParams)
13+
from matplotlib.backends.backend_agg import RendererAgg
1514
from matplotlib.image import imread
1615
from matplotlib.figure import Figure
1716
from matplotlib.testing.decorators import image_comparison
@@ -255,19 +254,3 @@ def test_draw_path_collection_error_handling():
255254
ax.scatter([1], [1]).set_paths(path.Path([(0, 1), (2, 3)]))
256255
with pytest.raises(TypeError):
257256
fig.canvas.draw()
258-
259-
260-
@image_comparison(["font_fallback.png"])
261-
def test_font_fallback():
262-
fp = fm.FontProperties(family=["Noto Sans CJK JP"])
263-
name = Path(fm.findfont(fp)).name
264-
if name != "NotoSansCJK-Regular.ttc":
265-
pytest.skip(f"Noto Sans CJK JP font may be missing, found: {name}")
266-
267-
plt.rc('font', family=['DejaVu Sans', 'Noto Sans CJK JP'], size=15)
268-
269-
with warnings.catch_warnings():
270-
warnings.filterwarnings('ignore', 'findfont: Font family.*not found')
271-
fig, ax = plt.subplots()
272-
ax.text(0.25, 0.475, "There are 多个汉字 in between!")
273-
fig.canvas.draw()

0 commit comments

Comments
 (0)