From 771a7c3fdef7b2e98e509293a8376a81c1282286 Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Wed, 30 Dec 2009 17:20:35 +0100 Subject: Wrap gio.Socket.condition_wait() and add a test --- tests/test_gsocket.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_gsocket.py b/tests/test_gsocket.py index 8f138a4..671026f 100644 --- a/tests/test_gsocket.py +++ b/tests/test_gsocket.py @@ -12,10 +12,14 @@ class TestSocket(unittest.TestCase): gio.SOCKET_TYPE_STREAM, gio.SOCKET_PROTOCOL_TCP) - def test_socket_condition(self): + def test_socket_condition_check(self): check = self.sock.condition_check(glib.IO_OUT) self.failUnless(isinstance(check, gobject.GFlags)) self.failUnlessEqual(check, glib.IO_OUT | glib.IO_HUP) + def test_socket_condition_wait(self): + res = self.sock.condition_wait(glib.IO_OUT) + self.failUnless(res) + def tearDown(self): self.sock.close() -- cgit