mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
[Tests] Ensure GTKUI tests are skipped upon import errors
Need to catch any issues with importing GTK modules to ensure GTKUI tests are skipped in non-GTK environments.
This commit is contained in:
parent
729f062ea1
commit
7c1c3f62d1
1 changed files with 7 additions and 6 deletions
|
@ -22,18 +22,19 @@ from .basetest import BaseTestCase
|
|||
|
||||
# Allow running other tests without GTKUI dependencies available
|
||||
try:
|
||||
from gi.repository.GObject import TYPE_UINT64
|
||||
except ImportError:
|
||||
libs_available = False
|
||||
TYPE_UINT64 = 'Whatever'
|
||||
else:
|
||||
libs_available = True
|
||||
# pylint: disable=ungrouped-imports
|
||||
from gi.repository.GObject import TYPE_UINT64
|
||||
|
||||
from deluge.ui.gtk3.gtkui import DEFAULT_PREFS
|
||||
from deluge.ui.gtk3.mainwindow import MainWindow
|
||||
from deluge.ui.gtk3.menubar import MenuBar
|
||||
from deluge.ui.gtk3.torrentdetails import TorrentDetails
|
||||
from deluge.ui.gtk3.torrentview import TorrentView
|
||||
except (ImportError, ValueError):
|
||||
libs_available = False
|
||||
TYPE_UINT64 = 'Whatever'
|
||||
else:
|
||||
libs_available = True
|
||||
|
||||
setup_translations()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue