diff options
author | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2015-04-26 17:57:27 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2015-07-17 15:27:05 +0200 |
commit | 888622339e1dffcb68959f00beb75166c4909fa5 (patch) | |
tree | 7c33537af8554d6521bbfe13d57129eca0fff211 | |
parent | 7ff6dd9a7ed55dff4083fa1f46657c2f96090b71 (diff) | |
download | grilo-888622339e1dffcb68959f00beb75166c4909fa5.tar.gz |
tests: Use GLib though introspection
+ And remove useless pygtk import.
https://bugzilla.gnome.org/show_bug.cgi?id=748455
-rw-r--r-- | tests/python/test_fs.py | 11 | ||||
-rwxr-xr-x | tests/python/testrunner.py | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/tests/python/test_fs.py b/tests/python/test_fs.py index add454d..3a37140 100644 --- a/tests/python/test_fs.py +++ b/tests/python/test_fs.py @@ -2,7 +2,6 @@ # proper mock sources. import unittest import os, tempfile, shutil, time, calendar -import glib try: from gi.repository import Grl @@ -166,7 +165,7 @@ class TestFSOperations(unittest.TestCase): options = Grl.OperationOptions.new(caps) self.plugin.search("a", [Grl.METADATA_KEY_ID], options, callback, None) - loop = glib.MainLoop() + loop = GLib.MainLoop() loop.run() def test_type_filtered_search_async(self): @@ -191,7 +190,7 @@ class TestFSOperations(unittest.TestCase): self.plugin.search("a", [Grl.METADATA_KEY_ID], options, callback, None) - loop = glib.MainLoop() + loop = GLib.MainLoop() loop.run() def test_key_filtered_search_async(self): @@ -215,7 +214,7 @@ class TestFSOperations(unittest.TestCase): options.set_key_filters({Grl.METADATA_KEY_MIME: 'image/jpeg'}) self.plugin.search("a", [Grl.METADATA_KEY_ID, Grl.METADATA_KEY_MIME], options, callback, None) - loop = glib.MainLoop() + loop = GLib.MainLoop() loop.run() def test_browse_async(self): @@ -249,8 +248,8 @@ class TestFSOperations(unittest.TestCase): self.plugin.browse(None, [Grl.METADATA_KEY_ID], options, callback, None) - loop = glib.MainLoop() - glib.timeout_add(1000, check_result) + loop = GLib.MainLoop() + GLib.timeout_add(1000, check_result) loop.run() diff --git a/tests/python/testrunner.py b/tests/python/testrunner.py index a41c88b..c5fc60f 100755 --- a/tests/python/testrunner.py +++ b/tests/python/testrunner.py @@ -2,8 +2,6 @@ import unittest import glob -import pygtk -pygtk.require('2.0') import sys test_loader = unittest.defaultTestLoader |