diff options
author | stijn <stijn@ignitron.net> | 2018-10-24 11:14:56 +0200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-10-30 14:49:23 +1100 |
commit | 06643a0df4e85cbdf18549440db19dc21fccbf76 (patch) | |
tree | 41ff6a4214463a8d87bd185d964ce09d1be050be | |
parent | e328a5d4693f9e4a03b296e7a9a7af6660d99515 (diff) | |
download | micropython-06643a0df4e85cbdf18549440db19dc21fccbf76.tar.gz micropython-06643a0df4e85cbdf18549440db19dc21fccbf76.zip |
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.
-rw-r--r-- | tests/extmod/uselect_poll_basic.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/extmod/uselect_poll_basic.py b/tests/extmod/uselect_poll_basic.py index 828fda1bbe..df52471ac3 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 |