Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f0dca9

Browse filesBrowse files
committed
Skip font test if font is already available.
1 parent 4b5a2db commit 2f0dca9
Copy full SHA for 2f0dca9

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎lib/matplotlib/tests/test_font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_font_manager.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ def test_user_fonts_linux(tmpdir, monkeypatch):
137137

138138
# Precondition: the test font should not be available
139139
fonts = findSystemFonts()
140-
assert not any(font_test_file in font for font in fonts)
140+
if any(font_test_file in font for font in fonts):
141+
pytest.skip(f'{font_test_file} already exists in system fonts')
141142

142143
# Prepare a temporary user font directory
143144
user_fonts_dir = tmpdir.join('fonts')
@@ -167,7 +168,8 @@ def test_user_fonts_win32():
167168

168169
# Precondition: the test font should not be available
169170
fonts = findSystemFonts()
170-
assert not any(font_test_file in font for font in fonts)
171+
if any(font_test_file in font for font in fonts):
172+
pytest.skip(f'{font_test_file} already exists in system fonts')
171173

172174
user_fonts_dir = MSUserFontDirectories[0]
173175

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.