]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.7] bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-25960)
authorZachary Ware <zach@python.org>
Fri, 7 May 2021 19:36:32 +0000 (14:36 -0500)
committerGitHub <noreply@github.com>
Fri, 7 May 2021 19:36:32 +0000 (15:36 -0400)
Lib/test/test_socket.py

index 41ba53b48153e8f07da818f94d5d9442ede230e3..5f4b019c048d9cd5de346b82bbc41c01025f43ba 100644 (file)
@@ -1863,8 +1863,10 @@ class CANTest(ThreadedCANSocketTest):
     def testSendFrame(self):
         cf, addr = self.s.recvfrom(self.bufsize)
         self.assertEqual(self.cf, cf)
-        self.assertEqual(addr[0], self.interface)
-        self.assertEqual(addr[1], socket.AF_CAN)
+        # XXX: This may not be strictly correct, but the ship has sailed for
+        #      3.7.  This is different in 3.8+; we just want the test to pass
+        #      in 3.7 at this point. -- ZW 6May21
+        self.assertEqual(addr, self.interface)
 
     def _testSendFrame(self):
         self.cf = self.build_can_frame(0x00, b'\x01\x02\x03\x04\x05')