From ac681df1e5ff1db5ca6b98425fd2bad1a4646d5e 2010-01-16 22:50:08 From: Fernando Perez Date: 2010-01-16 22:50:08 Subject: [PATCH] Make the test suite runnable without X11 connections. This fix makes the test suite work in settings like a screen session that can import but not initialize GTK. --- diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 8900099..4d5a9cc 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -81,7 +81,9 @@ def test_for(mod): """Test to see if mod is importable.""" try: __import__(mod) - except ImportError: + except (ImportError, RuntimeError): + # GTK reports Runtime error if it can't be initialized even if it's + # importable. return False else: return True