Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test_datagram_send_to_non_listening_address test to use unittest …
…assertion methods instead of assert.
  • Loading branch information
esoma committed Mar 21, 2024
commit 0878d992f2e26313a58f1108ed9852eee5ee5be9
12 changes: 6 additions & 6 deletions Lib/test/test_asyncio/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,14 +1425,14 @@ def create_socket():
transport_3.abort()

transport_1.sendto(b'a', addr=addr_2)
assert loop.run_until_complete(
self.assertEqual(loop.run_until_complete(
protocol_2.wait_for_datagram_received()
) == b'a'
), b'a')

transport_2.sendto(b'b', addr=addr_1)
assert loop.run_until_complete(
self.assertEqual(loop.run_until_complete(
protocol_1.wait_for_datagram_received()
) == b'b'
), b'b')

# this should send to an address that isn't listening
transport_1.sendto(b'c', addr=addr_3)
Expand All @@ -1441,9 +1441,9 @@ def create_socket():
# transport 1 should still be able to receive messages after sending to
# an address that wasn't listening
transport_2.sendto(b'd', addr=addr_1)
assert loop.run_until_complete(
self.assertEqual(loop.run_until_complete(
protocol_1.wait_for_datagram_received()
) == b'd'
), b'd')

def test_internal_fds(self):
loop = self.create_event_loop()
Expand Down