mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
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.
This commit is contained in:
parent
5740081c62
commit
ecff1e9e39
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user