summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@src.gnome.org>2008-07-11 19:18:28 +0000
committerGian Mario Tagliaretti <gianmt@src.gnome.org>2008-07-11 19:18:28 +0000
commiteaca30050adb0730653c8f9f434fedb4ffbf5164 (patch)
tree07206e5213131b23e9250f3698663c0f28bfd139 /tests
parent62f5b2f1929142c2a3eacd518da770dabfcc7995 (diff)
downloadpygobject-eaca30050adb0730653c8f9f434fedb4ffbf5164.tar.gz
pygobject-eaca30050adb0730653c8f9f434fedb4ffbf5164.tar.xz
pygobject-eaca30050adb0730653c8f9f434fedb4ffbf5164.zip
wrap File.load_contents with docstrings
svn path=/trunk/; revision=793
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gio.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py
index a21eba7..1b91d2d 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -61,6 +61,15 @@ class TestFile(unittest.TestCase):
self.assertRaises(TypeError, gio.File, foo="bar")
self.assertRaises(TypeError, gio.File, uri=1)
self.assertRaises(TypeError, gio.File, path=1)
+
+ def testLoadContents(self):
+ self._f.write("testing load_contents")
+ self._f.seek(0)
+ c = gio.Cancellable()
+ cont, leng, etag = self.file.load_contents(cancellable=c)
+ self.assertEqual(cont, "testing load_contents")
+ self.assertEqual(leng, 21)
+ self.assertNotEqual(etag, '')
class TestGFileEnumerator(unittest.TestCase):