diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-29 09:54:05 +0100 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-29 13:27:40 +0100 |
commit | 0fe00109c4f6fc27cbaae9b0a24ecfac71355d2f (patch) | |
tree | 26880eed26c2312867fb39078b6cc10f0887b909 /tests | |
parent | 86783c695f3641b9491962e8f95a4dcb91f4017c (diff) | |
download | pygobject-0fe00109c4f6fc27cbaae9b0a24ecfac71355d2f.tar.gz pygobject-0fe00109c4f6fc27cbaae9b0a24ecfac71355d2f.tar.xz pygobject-0fe00109c4f6fc27cbaae9b0a24ecfac71355d2f.zip |
Wrap gio.FileIOStream.query_info_async() and add a test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gio.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py index 49d83e8..a9ef159 100644 --- a/tests/test_gio.py +++ b/tests/test_gio.py @@ -1093,3 +1093,21 @@ class TestIOStream(unittest.TestCase): loop = glib.MainLoop() loop.run() + + + def testQueryInfoAsync(self): + def callback(stream, result): + try: + info = stream.query_info_finish(result) + self.failUnless(isinstance(info, gio.FileInfo)) + self.failUnless(info.get_attribute_uint64("standard::size"), 7) + finally: + loop.quit() + + ostream = self.iofile.get_output_stream() + ostream.write("testing") + + self.iofile.query_info_async("standard", callback) + + loop = glib.MainLoop() + loop.run() |