From 3bda069c5ab3a172c46f5f81b972a7e05161196a Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 23 Mar 2008 04:43:09 +0000 Subject: Skip the epoll test if epoll() does not work --- Lib/test/test_epoll.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py index f56d74f..ab1756c 100644 --- a/Lib/test/test_epoll.py +++ b/Lib/test/test_epoll.py @@ -33,6 +33,12 @@ from test import test_support 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): -- cgit v0.12