diff options
| author | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2008-07-11 19:18:28 +0000 |
|---|---|---|
| committer | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2008-07-11 19:18:28 +0000 |
| commit | eaca30050adb0730653c8f9f434fedb4ffbf5164 (patch) | |
| tree | 07206e5213131b23e9250f3698663c0f28bfd139 /tests | |
| parent | 62f5b2f1929142c2a3eacd518da770dabfcc7995 (diff) | |
| download | pygobject-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.py | 9 |
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): |
