summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gio.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_gio.py b/tests/test_gio.py
index cf82658..05b82b3 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -816,6 +816,26 @@ class TestOutputStream(unittest.TestCase):
loop = glib.MainLoop()
loop.run()
+
+ def testSpliceAsync(self):
+ _f = open("stream.txt", "w+")
+ _f.write("testing")
+ _f.seek(0)
+ instream = gio.unix.InputStream(_f.fileno(), False)
+
+ def callback(stream, result):
+ try:
+ size = stream.splice_finish(result)
+ self.assertEqual(size, 7)
+
+ finally:
+ os.unlink("stream.txt")
+ loop.quit()
+
+ self.stream.splice_async(instream, callback)
+
+ loop = glib.MainLoop()
+ loop.run()
class TestMemoryOutputStream(unittest.TestCase):
def setUp(self):