File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,14 @@ def place(m):
8080 print ("Checking IPython" )
8181 for t in tests :
8282 print ("running {} {}" .format (ipython , mefile (t , 'ipy' )))
83+ # Depending on the version IPython doesn't fail and prints on stdout,
8384 # so not try..except, redirection to stdout nor warning removal here.
8485 # However the warnings will still appear on stderr, so redirect to devnull.
85- output = subprocess .check_output ([ipython , mefile (t , 'ipy' )],
86- stderr = subprocess .DEVNULL )
86+ try :
87+ output = subprocess .check_output ([ipython , mefile (t , 'ipy' )],
88+ stderr = subprocess .DEVNULL )
89+ except Exception as e :
90+ output = e .output
8791 output = output .decode ('utf-8' )
8892 ## Clean up absolute paths (possibly ~/src/...).
8993 output = re .sub ('~?/.*?([^/\n ]+/[^/\n ]+) in' , r'\1 in' , output )
You can’t perform that action at this time.
0 commit comments