summaryrefslogtreecommitdiffstats
path: root/tests/test_gio.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_gio.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_gio.py')
-rw-r--r--tests/test_gio.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py
index 2d39220..128494f 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -3,7 +3,7 @@
import os
import unittest
-from common import gio, gobject
+from common import gio, glib
class TestFile(unittest.TestCase):
@@ -29,7 +29,7 @@ class TestFile(unittest.TestCase):
self.file.read_async(callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
def testReadAsyncError(self):
@@ -87,7 +87,7 @@ class TestFile(unittest.TestCase):
canc = gio.Cancellable()
self.file.load_contents_async(callback, cancellable=canc)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
def testMountMountable(self):
@@ -103,7 +103,7 @@ class TestFile(unittest.TestCase):
try:
try:
retval = gfile.mount_enclosing_volume_finish(result)
- except gobject.GError, e:
+ except glib.GError, e:
# If we run the tests too fast
if (e.domain == gio.ERROR and
e.code == gio.ERROR_ALREADY_MOUNTED):
@@ -121,7 +121,7 @@ class TestFile(unittest.TestCase):
gfile.mount_enclosing_volume(mount_operation,
mount_enclosing_volume_done)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
def testCopy(self):
@@ -182,7 +182,7 @@ class TestGFileEnumerator(unittest.TestCase):
self.file.enumerate_children_async(
"standard::*", callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
def testNextFilesAsync(self):
@@ -199,7 +199,7 @@ class TestGFileEnumerator(unittest.TestCase):
enumerator = self.file.enumerate_children(
"standard::*", gio.FILE_QUERY_INFO_NOFOLLOW_SYMLINKS)
enumerator.next_files_async(1000, callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
@@ -229,7 +229,7 @@ class TestInputStream(unittest.TestCase):
self.stream.read_async(7, callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
def testReadAsyncError(self):
@@ -239,14 +239,14 @@ class TestInputStream(unittest.TestCase):
self.count += 1
if self.count == 1:
return
- self.assertRaises(gobject.GError, stream.read_finish, result)
+ self.assertRaises(glib.GError, stream.read_finish, result)
finally:
loop.quit()
self.stream.read_async(10240, callback)
self.stream.read_async(10240, callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
self.assertEquals(self.count, 2)
@@ -273,7 +273,7 @@ class TestInputStream(unittest.TestCase):
self.stream.close_async(callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
@@ -304,21 +304,21 @@ class TestOutputStream(unittest.TestCase):
self.stream.write_async("testing", callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
def testWriteAsyncError(self):
def callback(stream, result):
self.assertEquals(result.get_op_res_gssize(), 0)
try:
- self.assertRaises(gobject.GError, stream.write_finish, result)
+ self.assertRaises(glib.GError, stream.write_finish, result)
finally:
loop.quit()
self.stream.close()
self.stream.write_async("testing", callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()
self.assertRaises(TypeError, self.stream.write_async)
@@ -342,7 +342,7 @@ class TestOutputStream(unittest.TestCase):
self.stream.close_async(callback)
- loop = gobject.MainLoop()
+ loop = glib.MainLoop()
loop.run()