Skip to content

Commit 5aaa0e2

Browse files
committed
tests/extmod: Close socket before polling to get error state.
1 parent 2200f50 commit 5aaa0e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/extmod/uevent_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
# Unregister socket via poll entry.
2727
entry.unregister()
2828

29-
# Poll a new socket, should be readable and writable (because it's in an error state).
29+
# Poll a closed socket, should be readable and writable.
3030
entry = poller.register(s, 3)
31+
s.close()
3132
poller.poll_ms(1)
3233
ready = list(poller)
3334
print(len(ready), ready[0].flags)
34-
poller.unregister(entry)
3535

3636
# Register many sockets to test reallocation of internal array.
3737
poller.register(s)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy