Issue #18308: don't take the scope ID into account when comparing IPv6

addresses.
This commit is contained in:
Charles-François Natali 2013-07-09 19:15:43 +02:00
parent ae6275d8c8
commit 37114bb548
1 changed files with 5 additions and 1 deletions

View File

@ -3225,7 +3225,11 @@ class RecvmsgIntoUDPTest(RecvmsgIntoTests, SendrecvmsgUDPTestBase):
class SendrecvmsgUDP6TestBase(SendrecvmsgDgramFlagsBase, class SendrecvmsgUDP6TestBase(SendrecvmsgDgramFlagsBase,
SendrecvmsgConnectionlessBase, SendrecvmsgConnectionlessBase,
ThreadedSocketTestMixin, UDP6TestBase): ThreadedSocketTestMixin, UDP6TestBase):
pass
def checkRecvmsgAddress(self, addr1, addr2):
# Called to compare the received address with the address of
# the peer, ignoring scope ID
self.assertEqual(addr1[:-1], addr2[:-1])
@requireAttrs(socket.socket, "sendmsg") @requireAttrs(socket.socket, "sendmsg")
@unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 required for this test.') @unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 required for this test.')