Skip to content

Commit 905db67

Browse files
committed
WebSearch re-order import
1 parent 56a9774 commit 905db67

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

WebSearch/tests/test_filetable.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,25 @@
3737
Each test ensures that the file table behaves correctly according to its configuration.
3838
"""
3939

40-
# The TMGimporter module imports Gtk at module load — skip the whole file if
40+
import os
41+
import sys
42+
import unittest
43+
44+
# The WebSearch module imports Gtk at module load — skip the whole file if
4145
# gi/Gtk aren't available (headless-without-GTK environments). On systems
4246
# where both GTK3 and GTK4 are present, pin Gtk to 3.0 before any gramps
4347
# import (mirrors what gramps.grampsapp does at startup); otherwise
4448
# PyGObject loads GTK4 and the gramps.gui import chain crashes on
4549
# Gtk.IconSize.MENU (a GTK3-only enum).
50+
4651
try:
4752
import gi
48-
4953
gi.require_version("Gtk", "3.0")
5054
gi.require_version("Gdk", "3.0")
5155
except (ImportError, ValueError, AttributeError) as err:
5256
raise unittest.SkipTest("GTK 3.0 / PyGObject not available: %s" % err)
5357

54-
import os
5558

56-
import sys
57-
import unittest
5859

5960
# Make sure addon modules are importable from the parent directory
6061
# (matches the convention used by TMGimporter/Form tests). Required when

0 commit comments

Comments
 (0)