summaryrefslogtreecommitdiffstats
path: root/tests/test_source.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-26 08:37:59 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-26 08:37:59 +0000
commitb94d79214498b07abc22e676897c8314cc386c7c (patch)
treeb73c3e64c8363d9a89c98212a436a7445d57c217 /tests/test_source.py
parent444fcf054cfa845c06cc23e2a67303ed0aa1f402 (diff)
downloadpygobject-b94d79214498b07abc22e676897c8314cc386c7c.tar.gz
pygobject-b94d79214498b07abc22e676897c8314cc386c7c.tar.xz
pygobject-b94d79214498b07abc22e676897c8314cc386c7c.zip
Move over glib constants to gobject
2008-07-26 Johan Dahlin <johan@gnome.org> * glib/glibmodule.c (pyglib_register_constants), (init_glib): * gobject/__init__.py: * gobject/gobjectmodule.c (init_gobject): Move over glib constants to gobject * tests/test_gio.py: * tests/test_mainloop.py: * tests/test_source.py: * tests/test_subprocess.py: * tests/test_thread.py: Update tests to refer to glib when appropriate svn path=/trunk/; revision=858
Diffstat (limited to 'tests/test_source.py')
-rw-r--r--tests/test_source.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_source.py b/tests/test_source.py
index 8e7e81c..a5118a9 100644
--- a/tests/test_source.py
+++ b/tests/test_source.py
@@ -6,11 +6,11 @@ import sys
import select
import unittest
-from common import gobject
+from common import glib, gobject
-class Idle(gobject.Idle):
+class Idle(glib.Idle):
def __init__(self, loop):
- gobject.Idle.__init__(self)
+ glib.Idle.__init__(self)
self.count = 0
self.set_callback(self.callback, loop)
@@ -18,9 +18,9 @@ class Idle(gobject.Idle):
self.count += 1
return True
-class MySource(gobject.Source):
+class MySource(glib.Source):
def __init__(self):
- gobject.Source.__init__(self)
+ glib.Source.__init__(self)
def prepare(self):
return True, 0
@@ -40,12 +40,12 @@ class TestSource(unittest.TestCase):
return True
def setup_timeout(self, loop):
- timeout = gobject.Timeout(500)
+ timeout = glib.Timeout(500)
timeout.set_callback(self.timeout_callback, loop)
timeout.attach()
def testSources(self):
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
self.setup_timeout(loop)
@@ -65,9 +65,9 @@ class TestSource(unittest.TestCase):
def testSourcePrepare(self):
# this test may not terminate if prepare() is wrapped incorrectly
dispatched = [False]
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
- class CustomTimeout(gobject.Source):
+ class CustomTimeout(glib.Source):
def prepare(self):
return (False, 10)
@@ -93,8 +93,8 @@ class TestSource(unittest.TestCase):
class TestTimeout(unittest.TestCase):
def test504337(self):
- timeout_source = gobject.Timeout(20)
- idle_source = gobject.Idle()
+ timeout_source = glib.Timeout(20)
+ idle_source = glib.Idle()
if __name__ == '__main__':