[Python-checkins] r61778 - python/trunk/Lib/test/test_epoll.py

neal.norwitz python-checkins at python.org
Sun Mar 23 05:43:09 CET 2008


Author: neal.norwitz
Date: Sun Mar 23 05:43:09 2008
New Revision: 61778

Modified:
   python/trunk/Lib/test/test_epoll.py
Log:
Skip the epoll test if epoll() does not work

Modified: python/trunk/Lib/test/test_epoll.py
==============================================================================
--- python/trunk/Lib/test/test_epoll.py	(original)
+++ python/trunk/Lib/test/test_epoll.py	Sun Mar 23 05:43:09 2008
@@ -33,6 +33,12 @@
 if not hasattr(select, "epoll"):
     raise test_support.TestSkipped("test works only on Linux 2.6")
 
+try:
+    select.epoll()
+except IOError, e:
+    if e.errno == errno.ENOSYS:
+        raise test_support.TestSkipped("kernel doesn't support epoll()")
+
 class TestEPoll(unittest.TestCase):
 
     def setUp(self):


More information about the Python-checkins mailing list