aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Rivera <stefano@rivera.za.net>2020-10-13 16:39:07 -0700
committerStefano Rivera <stefano@rivera.za.net>2020-10-13 16:39:07 -0700
commit0468b87cd4a1d5340873b0f4d6d84c5fc1d47735 (patch)
treeae751b6b9676f76d9fc1c4e09143aef6d98beaec /lib-python
parentbpo-31893: Simplify select.kqueue object comparison (diff)
downloadpypy-0468b87cd4a1d5340873b0f4d6d84c5fc1d47735.tar.gz
pypy-0468b87cd4a1d5340873b0f4d6d84c5fc1d47735.tar.bz2
pypy-0468b87cd4a1d5340873b0f4d6d84c5fc1d47735.zip
Support current MacOS in this (non-upstream) kqueue test
On MacOS 10.15 (and presumably other recent versions) ENOENT is returned rather than EBADF. But that's besides the point of the test, so handle it.
Diffstat (limited to 'lib-python')
-rw-r--r--lib-python/2.7/test/test_kqueue.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib-python/2.7/test/test_kqueue.py b/lib-python/2.7/test/test_kqueue.py
index 0efb3b1350..384b2fa59a 100644
--- a/lib-python/2.7/test/test_kqueue.py
+++ b/lib-python/2.7/test/test_kqueue.py
@@ -238,8 +238,8 @@ class TestKQueue(unittest.TestCase):
with self.assertRaises(OSError) as cm:
kq.control([event], 0, 0)
- self.assertEqual(cm.exception.args[0], errno.EBADF)
- self.assertEqual(cm.exception.errno, errno.EBADF)
+ self.assertIn(cm.exception.args[0], (errno.EBADF, errno.ENOENT))
+ self.assertIn(cm.exception.errno, (errno.EBADF, errno.ENOENT))
kq.close()