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