summaryrefslogtreecommitdiff
path: root/tests/test_unknown.py
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@redhat.com>2011-07-22 11:20:09 -0400
committerJohn (J5) Palmieri <johnp@redhat.com>2011-08-11 08:35:00 -0400
commitb8700451acd4a19b59b64fc8641fca748d2189e2 (patch)
treeeed5041e3a6e994adf4a7e7051286aeb941bb87c /tests/test_unknown.py
parentc980dae21468fe073cc8782608148c346bb90ad7 (diff)
downloadpygobject-b8700451acd4a19b59b64fc8641fca748d2189e2.tar.gz
refactor tests to only use PyGObject 3 syntax
* for PyGObject 3 we want to discourage the use of legacy interfaces * Using interfaces like from gi.repository import GObject makes sure that the internal _gobject module is loaded and not PyGObject 2's gobject module which would cause the application to not work correctly https://bugzilla.gnome.org/show_bug.cgi?id=642048
Diffstat (limited to 'tests/test_unknown.py')
-rw-r--r--tests/test_unknown.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_unknown.py b/tests/test_unknown.py
index 2a18eec7..8c076a86 100644
--- a/tests/test_unknown.py
+++ b/tests/test_unknown.py
@@ -2,17 +2,17 @@
import unittest
-import gobject
+from gi.repository import GObject
import testhelper
-TestInterface = gobject.GType.from_name('TestInterface')
+TestInterface = GObject.GType.from_name('TestInterface')
class TestUnknown(unittest.TestCase):
def testFoo(self):
obj = testhelper.get_unknown()
- TestUnknownGType = gobject.GType.from_name('TestUnknown')
- TestUnknown = gobject.new(TestUnknownGType).__class__
+ TestUnknownGType = GObject.GType.from_name('TestUnknown')
+ TestUnknown = GObject.new(TestUnknownGType).__class__
assert isinstance(obj, testhelper.Interface)
assert isinstance(obj, TestUnknown)