Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2021

Conversation

miss-islington
Copy link
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 [email protected]

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 <[email protected]>
@miss-islington
Copy link
Contributor Author

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

3 similar comments
@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@miss-islington miss-islington merged commit 7b4725a into python:3.10 May 4, 2021
@miss-islington miss-islington deleted the backport-355bae8-3.10 branch May 4, 2021 21:01
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