Revision: 5778
http://jython.svn.sourceforge.net/jython/?rev=5778&view=rev
Author: amak
Date: 2008-12-18 20:12:14 +0000 (Thu, 18 Dec 2008)
Log Message:
-----------
Added unit test to explicitly check for selecting on socket.fileno().
Related to a bug in 2.2, as reported in
http://bugs.jython.org/issue1211
Modified Paths:
--------------
trunk/jython/Lib/test/test_select.py
Modified: trunk/jython/Lib/test/test_select.py
===================================================================
--- trunk/jython/Lib/test/test_select.py 2008-12-18 17:43:35 UTC (rev 5777)
+++ trunk/jython/Lib/test/test_select.py 2008-12-18 20:12:14 UTC (rev 5778)
@@ -178,6 +178,18 @@
else:
self.fail("Registering blocking socket should have raised select.error")
+ def testSelectOnSocketFileno(self):
+ self.cli_conn = self.serv.accept()
+
+ def _testSelectOnSocketFileno(self):
+ self.cli.setblocking(0)
+ self.cli.connect( (self.HOST, self.PORT) )
+ return
+ try:
+ rfd, wfd, xfd = select.select([self.cli.fileno()], [], [], 1)
+ except Exception, x:
+ self.fail("Selecting on socket.fileno() should not have raised exception: %s" % str(x))
+
class TestPipes(unittest.TestCase):
verbose = 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|