diff options
author | Stefano Rivera <stefano@rivera.za.net> | 2020-10-13 16:39:07 -0700 |
---|---|---|
committer | Stefano Rivera <stefano@rivera.za.net> | 2020-10-13 16:39:07 -0700 |
commit | 0468b87cd4a1d5340873b0f4d6d84c5fc1d47735 (patch) | |
tree | ae751b6b9676f76d9fc1c4e09143aef6d98beaec /lib-python | |
parent | bpo-31893: Simplify select.kqueue object comparison (diff) | |
download | pypy-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.py | 4 |
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() |