diff --git a/subprojects/gst-python/testsuite/test_plugin.py b/subprojects/gst-python/testsuite/test_plugin.py
index 3ab299d54c..4ed1e85c82 100644
--- a/testsuite/test_plugin.py
+++ b/testsuite/test_plugin.py
@@ -18,14 +18,14 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 
-from gi.repository import Gst
-import gi
-from common import TestCase, unittest
 import overrides_hack
 overrides_hack
 
+from common import TestCase, unittest
 
+import gi
 gi.require_version("Gst", "1.0")
+from gi.repository import Gst
 
 
 class TestPlugin(TestCase):
