##// END OF EJS Templates
Backport PR #2668: pylab_not_importable: Catch all exceptions, not just RuntimeErrors....
MinRK -
Show More
@@ -16,11 +16,11 b' from IPython.lib import irunner'
16 from IPython.testing import decorators
16 from IPython.testing import decorators
17
17
18 def pylab_not_importable():
18 def pylab_not_importable():
19 """Test if importing pylab fails with RuntimeError (true when having no display)"""
19 """Test if importing pylab fails. (For example, when having no display)"""
20 try:
20 try:
21 import pylab
21 import pylab
22 return False
22 return False
23 except RuntimeError:
23 except:
24 return True
24 return True
25
25
26 # Testing code begins
26 # Testing code begins
General Comments 0
You need to be logged in to leave comments. Login now