[pygobject] test_iochannel.py: Fix data type of IOFlags
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] test_iochannel.py: Fix data type of IOFlags
- Date: Thu, 25 Oct 2012 12:45:57 +0000 (UTC)
commit 0bfa6b44b808d9f8f55199216c29c1aec96c7719
Author: Martin Pitt <martinpitt gnome org>
Date: Thu Oct 25 12:59:46 2012 +0200
test_iochannel.py: Fix data type of IOFlags
~GLib.IOFlags.NONBLOCK yields an int instead of a GLib.IOFlags, so ensure that
the result is of type GLib.IOFlags again.
tests/test_iochannel.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_iochannel.py b/tests/test_iochannel.py
index 868c6ba..85af822 100644
--- a/tests/test_iochannel.py
+++ b/tests/test_iochannel.py
@@ -174,7 +174,7 @@ second line
self.assertEqual(ch.read(), b'\x01\x02')
# now test blocking case, after closing the write end
- ch.set_flags(ch.get_flags() & ~GLib.IOFlags.NONBLOCK)
+ ch.set_flags(GLib.IOFlags(ch.get_flags() & ~GLib.IOFlags.NONBLOCK))
os.write(w, b'\x03\x04')
os.close(w)
self.assertEqual(ch.read(), b'\x03\x04')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]