File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments