File tree 1 file changed +6
-8
lines changed
lib/matplotlib/sphinxext/tests 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 14
14
TINY_PAGES = pjoin (HERE , 'tinypages' )
15
15
16
16
17
- def setup ():
18
- # Check we have the sphinx-build command
17
+ def setup_module ():
18
+ """ Check we have the sphinx-build command"""
19
19
try :
20
20
ret = call (['sphinx-build' , '--help' ], stdout = PIPE , stderr = PIPE )
21
21
except OSError :
@@ -33,7 +33,7 @@ def file_same(file1, file2):
33
33
34
34
35
35
class TestTinyPages (object ):
36
- # Test build and output of tinypages project
36
+ """ Test build and output of tinypages project"""
37
37
38
38
@classmethod
39
39
def setup_class (cls ):
@@ -48,14 +48,12 @@ def setup_class(cls):
48
48
cls .html_dir ]
49
49
proc = Popen (cmd , stdout = PIPE , stderr = PIPE )
50
50
out , err = proc .communicate ()
51
+ if proc .returncode != 0 :
52
+ raise RuntimeError ('sphinx-build failed with stdout:\n '
53
+ '{0}\n stderr:\n {1}\n ' .format (out , err ))
51
54
except Exception as e :
52
55
shutil .rmtree (cls .page_build )
53
56
raise e
54
- if proc .returncode != 0 :
55
- shutil .rmtree (cls .page_build )
56
- raise RuntimeError ('sphinx-build failed with stdout:\n '
57
- '{0}\n stderr:\n {1}\n ' .format (
58
- out , err ))
59
57
60
58
@classmethod
61
59
def teardown_class (cls ):
You can’t perform that action at this time.
0 commit comments