summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-03-22 18:14:01 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-03-22 18:14:01 +0000
commitc27ae2b634dc06b1242ac7a9368d11945a4e1783 (patch)
tree6df83df006616945e974ceef542906a84bb1ae44 /tests
parent6ee167447336570b83e41ca2c4216d6e9058fd43 (diff)
downloadpygobject-c27ae2b634dc06b1242ac7a9368d11945a4e1783.tar.gz
pygobject-c27ae2b634dc06b1242ac7a9368d11945a4e1783.tar.xz
pygobject-c27ae2b634dc06b1242ac7a9368d11945a4e1783.zip
Make read_finish() return the string, remove the get_buffer method. This
2008-03-22 Johan Dahlin <johan@gnome.org> * gio/ginputstream.override: * gio/gio.override: * tests/test_gio.py: Make read_finish() return the string, remove the get_buffer method. This is more pythonic, as it mimics the normal read() behavior of python. Update the tests and use a separate marshaller for read. svn path=/trunk/; revision=753
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gio.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py
index 2b12d5b..ce1095e 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -66,9 +66,8 @@ class TestInputStream(unittest.TestCase):
def testReadAsync(self):
def callback(stream, result):
try:
- read = stream.read_finish(result)
- self.assertEquals(read, len("testing"))
- self.assertEquals(result.get_buffer(), "testing")
+ data = stream.read_finish(result)
+ self.assertEquals(data, "testing")
stream.close()
finally:
loop.quit()
@@ -82,7 +81,6 @@ class TestInputStream(unittest.TestCase):
self.count = 0
def callback(stream, result):
try:
- #self.assertEquals(result.get_buffer(), None)
self.count += 1
if self.count == 1:
return