summaryrefslogtreecommitdiffstats
path: root/tests/test_gio.py
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-01-20 10:21:31 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-01-20 10:21:31 +0000
commit5df2f97e4db1dfefc1ff933758e9b580d796c53c (patch)
tree9f86123668a30590ff78b76afc5772f71fa8ada9 /tests/test_gio.py
parent7df645aa2537b31b7801206d4ea4125799ddd99c (diff)
downloadpygobject-5df2f97e4db1dfefc1ff933758e9b580d796c53c.tar.gz
pygobject-5df2f97e4db1dfefc1ff933758e9b580d796c53c.tar.xz
pygobject-5df2f97e4db1dfefc1ff933758e9b580d796c53c.zip
Add a new method, to fetch the buffer (_wrap_g_input_stream_read_async):
2008-01-20 Johan Dahlin <johan@gnome.org> * gio/gio.override (_wrap_g_simple_async_result_get_buffer): Add a new method, to fetch the buffer (_wrap_g_input_stream_read_async): Save a reference to the buffer. * tests/test_gio.py (TestInputStream.testReadAsync.callback): Check the content svn path=/trunk/; revision=740
Diffstat (limited to 'tests/test_gio.py')
-rw-r--r--tests/test_gio.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py
index 3bb2746..092a8ec 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -25,10 +25,11 @@ class TestInputStream(unittest.TestCase):
def callback(stream, result):
read = stream.read_finish(result)
self.assertEquals(read, len("testing"))
+ self.assertEquals(result.get_buffer(), "testing")
stream.close()
loop.quit()
- self.stream.read_async(10240, 0, None, callback)
+ self.stream.read_async(7, 0, None, callback)
loop = gobject.MainLoop()
loop.run()
@@ -36,6 +37,7 @@ class TestInputStream(unittest.TestCase):
def testReadAsyncError(self):
self.count = 0
def callback(stream, result):
+ #self.assertEquals(result.get_buffer(), None)
self.count += 1
if self.count == 1:
return