Skip to content

Commit c7fd3e5

Browse files
committed
Fix CI on 3.8+
1 parent 305b258 commit c7fd3e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ async def listen_for_packets():
138138
await harness.send(2, b"one", b"two")
139139
await harness.expect(2, b"one", b"two")
140140
async with harness.enqueue_packets_to(2, queue_num, forwarded=False):
141-
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
142-
for payload in (b"three", b"four"):
143-
sock.sendto(payload, harness.dest_addr[2])
141+
with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock:
142+
for payload in (b"three", b"four"):
143+
sock.sendto(payload, harness.dest_addr[2])
144144
with trio.fail_after(1):
145145
while len(hwaddrs) < 4:
146146
await trio.sleep(0.1)

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