Skip to content

[3.9] bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548)#25903

Merged
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-355bae8-3.9
May 4, 2021
Merged

[3.9] bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548)#25903
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-355bae8-3.9

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented May 4, 2021

The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d4. 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 355bae8)

Co-authored-by: karl ding karlding@users.noreply.github.com

https://bugs.python.org/issue40297

The address tuple for CAN_RAW no longer returns the address family
after the introduction of CAN ISO-TP support in a30f6d4. 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 355bae8)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
@miss-islington
Copy link
Copy Markdown
Contributor Author

@karlding and @zware: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit df99532 into python:3.9 May 4, 2021
@miss-islington miss-islington deleted the backport-355bae8-3.9 branch May 4, 2021 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants