diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-08-18 16:57:45 +1000 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2023-06-08 17:54:24 +1000 |
commit | 4216bc7d1351feb8199e4ebbff1a9598aa1c5b02 (patch) | |
tree | 5085738ef65ab377c221f290c7fa90ec2acd4d29 /tests/extmod/uselect_poll_udp.py | |
parent | 5e50975a6dd9466afafbcd012c00078093fe1f57 (diff) | |
download | micropython-4216bc7d1351feb8199e4ebbff1a9598aa1c5b02.tar.gz micropython-4216bc7d1351feb8199e4ebbff1a9598aa1c5b02.zip |
tests: Replace umodule with module everywhere.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'tests/extmod/uselect_poll_udp.py')
-rw-r--r-- | tests/extmod/uselect_poll_udp.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/extmod/uselect_poll_udp.py b/tests/extmod/uselect_poll_udp.py deleted file mode 100644 index 2a56a122b5..0000000000 --- a/tests/extmod/uselect_poll_udp.py +++ /dev/null @@ -1,30 +0,0 @@ -# test select.poll on UDP sockets - -try: - import usocket as socket, uselect as select -except ImportError: - try: - import socket, select - - select.poll # Raises AttributeError for CPython implementations without poll() - except (ImportError, AttributeError): - print("SKIP") - raise SystemExit - - -s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) -s.bind(socket.getaddrinfo("127.0.0.1", 8000)[0][-1]) -poll = select.poll() - -# UDP socket should not be readable -poll.register(s, select.POLLIN) -print(len(poll.poll(0))) - -# UDP socket should be writable -poll.modify(s, select.POLLOUT) -print(poll.poll(0)[0][1] == select.POLLOUT) - -# same test for select.select, but just skip it if the function isn't available -if hasattr(select, "select"): - r, w, e = select.select([s], [], [], 0) - assert not r and not w and not e |