From 59da8cd24ea390b6c983995833ec6b0e5d028b35 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Sun, 24 May 2009 11:44:24 +0200 Subject: Wrap gio.OutputStream.flush_async() wrap gio.OutputStream.flush_async() and add a test. --- tests/test_gio.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/test_gio.py b/tests/test_gio.py index d36c213..cf82658 100644 --- a/tests/test_gio.py +++ b/tests/test_gio.py @@ -804,7 +804,18 @@ class TestOutputStream(unittest.TestCase): loop = glib.MainLoop() loop.run() + + def testFlushAsync(self): + def callback(stream, result): + try: + self.failUnless(stream.flush_finish(result)) + finally: + loop.quit() + + self.stream.flush_async(callback) + loop = glib.MainLoop() + loop.run() class TestMemoryOutputStream(unittest.TestCase): def setUp(self): -- cgit