◐ Shell
clean mode source ↗

gh-116622: Test updates for Android by mhsmith · Pull Request #117299 · python/cpython

Conversation

@mhsmith

@mhsmith mhsmith commented

Mar 27, 2024

edited by bedevere-app Bot

Loading

mhsmith

Comment on lines +2696 to 2700

@unittest.skipIf(
sys.platform.startswith(("freebsd", "wasi"))
or (sys.platform == "android" and platform.machine() == "x86_64"),
f"this platform doesn't implement IEE 754-2008 properly")
def test_fma_zero_result(self):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhsmith

@erlend-aasland: Are you able to review this PR? It's a continuation of the previous Android test updates from #115918.

erlend-aasland

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with some nits. BTW, last time I checked, the sys.platform.startswith idiom was still recommended practice. I'd prefer if we could follow that.

# The Android testbed redirects the native stdout to a pipe,
# which returns a different error code.
known_errnos.append(errno.EACCES)
if (sys.platform == "win32") or (e.errno in known_errnos):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parentheses are not needed.

@mhsmith

The parentheses are not needed.

Fixed.

last time I checked, the sys.platform.startswith idiom was still recommended practice

I actually updated the sys.platform documentation in #116215 (comment) to limit this recommendation to FreeBSD. Ever since Python 3.3, all other PEP 11-supported platforms have returned a fixed string without a version number.

@erlend-aasland

@mhsmith, thanks for the heads-up, I missed that docs update (and I've must have looked at the 3.12 docs). Perhaps we should consider backporting that doc patch.

erlend-aasland

diegorusso pushed a commit to diegorusso/cpython that referenced this pull request

Apr 17, 2024
- re-enable test_fcntl_64_bit on Linux aarch64, but disable it on all
  Android ABIs
- use support.setswitchinterval in all relevant tests
- skip test_fma_zero_result on Android x86_64
- accept EACCES when calling os.get_terminal_size on Android

Reviewers

@erlend-aasland erlend-aasland erlend-aasland approved these changes

@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner

@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner

@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner

@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Labels

2 participants

@mhsmith @erlend-aasland