diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-17 09:18:18 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-17 09:18:18 (GMT) |
commit | e52e3786c67e16b7b8adba71227f9e3c5350d7a6 (patch) | |
tree | 613aaae36e1423975fcf2d7ba390f70c7f84e9c7 /Lib/test/test_kqueue.py | |
parent | cf7128ccbcf2b68eff6c5b47f6334b01882c818b (diff) | |
download | cpython-e52e3786c67e16b7b8adba71227f9e3c5350d7a6.zip cpython-e52e3786c67e16b7b8adba71227f9e3c5350d7a6.tar.gz cpython-e52e3786c67e16b7b8adba71227f9e3c5350d7a6.tar.bz2 |
Merged revisions 73995,74002,74005,74007-74008,74011,74019-74023 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73995 | vinay.sajip | 2009-07-13 07:21:05 -0400 (Mon, 13 Jul 2009) | 1 line
Issue #6314: logging: Extra checks on the "level" argument in more places.
........
r74002 | marc-andre.lemburg | 2009-07-13 16:23:49 -0400 (Mon, 13 Jul 2009) | 6 lines
Use a new global DEV_NULL instead of hard-coding /dev/null into the system
command helper functions.
See #6479 for some motivation.
........
r74005 | marc-andre.lemburg | 2009-07-13 17:28:33 -0400 (Mon, 13 Jul 2009) | 6 lines
Use a different VER command output parser to address the localization
issues mentioned in #3410.
Prepare for Windows 7 (still commented out).
........
r74007 | michael.foord | 2009-07-14 13:58:12 -0400 (Tue, 14 Jul 2009) | 1 line
Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418.
........
r74008 | benjamin.peterson | 2009-07-14 20:46:42 -0400 (Tue, 14 Jul 2009) | 1 line
update year
........
r74011 | ezio.melotti | 2009-07-15 13:07:04 -0400 (Wed, 15 Jul 2009) | 1 line
methods' names pep8ification
........
r74019 | amaury.forgeotdarc | 2009-07-15 17:29:27 -0400 (Wed, 15 Jul 2009) | 2 lines
#6076 Add a title to the IDLE Preferences window.
........
r74020 | georg.brandl | 2009-07-16 03:18:07 -0400 (Thu, 16 Jul 2009) | 1 line
#5910: fix kqueue for calls with more than one event.
........
r74021 | georg.brandl | 2009-07-16 03:33:04 -0400 (Thu, 16 Jul 2009) | 1 line
#6486: start with built in functions rather than "built in objects".
........
r74022 | georg.brandl | 2009-07-16 03:38:35 -0400 (Thu, 16 Jul 2009) | 1 line
#6481: fix typo in os.system() replacement.
........
r74023 | jesse.noller | 2009-07-16 10:23:04 -0400 (Thu, 16 Jul 2009) | 1 line
Issue 6433: multiprocessing.pool.map hangs on empty list
........
Diffstat (limited to 'Lib/test/test_kqueue.py')
-rw-r--r-- | Lib/test/test_kqueue.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_kqueue.py b/Lib/test/test_kqueue.py index dd1ecc8..5ba21a2 100644 --- a/Lib/test/test_kqueue.py +++ b/Lib/test/test_kqueue.py @@ -163,6 +163,22 @@ class TestKQueue(unittest.TestCase): server.close() serverSocket.close() + def testPair(self): + kq = select.kqueue() + a, b = socket.socketpair() + + a.send(b'foo') + event1 = select.kevent(a, select.KQ_FILTER_READ, select.KQ_EV_ADD | select.KQ_EV_ENABLE) + event2 = select.kevent(b, select.KQ_FILTER_READ, select.KQ_EV_ADD | select.KQ_EV_ENABLE) + r = kq.control([event1, event2], 1, 1) + self.assertTrue(r) + self.assertFalse(r[0].flags & select.KQ_EV_ERROR) + self.assertEquals(b.recv(r[0].data), b'foo') + + a.close() + b.close() + kq.close() + def test_main(): support.run_unittest(TestKQueue) |