diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-30 17:20:35 +0100 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-30 17:20:35 +0100 |
commit | 771a7c3fdef7b2e98e509293a8376a81c1282286 (patch) | |
tree | 6ea0fd817eaff86fc41d1b12f808dd081a510174 /tests | |
parent | 50960656815b0897a5ebe5f011537b8dcbdc857e (diff) | |
download | pygobject-771a7c3fdef7b2e98e509293a8376a81c1282286.tar.gz pygobject-771a7c3fdef7b2e98e509293a8376a81c1282286.tar.xz pygobject-771a7c3fdef7b2e98e509293a8376a81c1282286.zip |
Wrap gio.Socket.condition_wait() and add a test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gsocket.py | 6 |
1 files changed, 5 insertions, 1 deletions
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() |