summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gio.py18
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()