Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc4a19c1

Browse files
committed
Make sure convert works without nose.
1 parentd379ef6 commitc4a19c1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎lib/matplotlib/testing/compare.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,14 @@ def convert(filename, cache):
174174
"""
175175
base,extension=filename.rsplit('.',1)
176176
ifextensionnotinconverter:
177-
fromnoseimportSkipTest
178-
raiseSkipTest("Don't know how to convert %s files to png"%extension)
177+
reason="Don't know how to convert %s files to png"%extension
178+
from .importis_called_from_pytest
179+
ifis_called_from_pytest():
180+
importpytest
181+
pytest.skip(reason)
182+
else:
183+
fromnoseimportSkipTest
184+
raiseSkipTest(reason)
179185
newname=base+'_'+extension+'.png'
180186
ifnotos.path.exists(filename):
181187
raiseIOError("'%s' does not exist"%filename)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp