summaryrefslogtreecommitdiff
path: root/tests/extmod/uselect_poll_basic.py
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2018-10-24 11:14:56 +0200
committerDamien George <damien.p.george@gmail.com>2018-10-30 14:49:23 +1100
commit06643a0df4e85cbdf18549440db19dc21fccbf76 (patch)
tree41ff6a4214463a8d87bd185d964ce09d1be050be /tests/extmod/uselect_poll_basic.py
parente328a5d4693f9e4a03b296e7a9a7af6660d99515 (diff)
tests/extmod: Skip uselect test when CPython doesn't have poll().
CPython does not have an implementation of select.poll() on some operating systems (Windows, OSX depending on version) so skip the test in those cases instead of failing it.
Diffstat (limited to 'tests/extmod/uselect_poll_basic.py')
-rw-r--r--tests/extmod/uselect_poll_basic.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/extmod/uselect_poll_basic.py b/tests/extmod/uselect_poll_basic.py
index 828fda1bb..df52471ac 100644
--- a/tests/extmod/uselect_poll_basic.py
+++ b/tests/extmod/uselect_poll_basic.py
@@ -3,7 +3,8 @@ try:
except ImportError:
try:
import socket, select, errno
- except ImportError:
+ select.poll # Raises AttributeError for CPython implementations without poll()
+ except (ImportError, AttributeError):
print("SKIP")
raise SystemExit