]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548) (#25957)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 7 May 2021 13:54:42 +0000 (06:54 -0700)
committerGitHub <noreply@github.com>
Fri, 7 May 2021 13:54:42 +0000 (15:54 +0200)
commit8a12f46dd8c780de84d78e6dd8350230e52e0c46
tree950857b75db967f953b15ef585cc43c6e3fd9133
parentf396864ddfe914531b5856d7bf852808ebfc01ae
bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548) (#25957)

The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d45ac3. However,
updating test_socket.CANTest.testSendFrame was missed as part of the
change, so the test incorrectly attempts to index past the last tuple
item to retrieve the address family.

This removes the now-redundant check for equality against socket.AF_CAN,
as the tuple will not contain the address family.
(cherry picked from commit 355bae88822bee4de6092b63d69c5a5dad393a16)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
Lib/test/test_socket.py