FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-114099: Add test exclusions to support running the test suite on iOS by freakboy3742 · Pull Request #114889 · python/cpython · GitHub

/ cpython Public

gh-114099: Add test exclusions to support running the test suite on iOS - #114889

Merged
erlend-aasland merged 6 commits into
python:mainfrom
freakboy3742:iOS-test-skips
Feb 5, 2024
Merged

gh-114099: Add test exclusions to support running the test suite on iOS#114889
erlend-aasland merged 6 commits into
python:mainfrom
freakboy3742:iOS-test-skips

Conversation

freakboy3742 commented Feb 2, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Part of the PEP 730 work to add iOS support.

Adds test annotations required to run the CPython test suite on iOS.

The majority of these changes involve:

  • Annotating tests that use subprocess, but are skipped on Emscripten/WASI for other reasons
  • Including iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks

is_apple and is_apple_mobile test helpers have been added to identify any Apple platform, and "any Apple platform except macOS", respectively.

Refs #114099.

erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, looks good to me!

Comment thread Lib/test/support/__init__.py Outdated
Comment thread Lib/test/support/__init__.py Outdated
Comment thread Lib/test/test_pty.py Outdated
Comment thread Lib/test/test_venv.py Outdated

mhsmith commented Feb 4, 2024

Copy link
Copy Markdown
Member

I'm not a project member, so I can't resolve my conversations, but they've all now been addressed.

willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good. Ran without issue on Sonoma 14.2.1. One small question/nit re: an import.
🚢



@unittest.skipUnless(hasattr(os, 'fork'), 'requires os.fork()')
@support.requires_fork()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nice. Much cleaner.

self.console = code.InteractiveConsole(local_exit=True)
self.mock_sys()

@unittest.skipIf(sys.flags.no_site, "exit() isn't defined unless there's a site module")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Does this work if the import site does not exist in the file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It does - the import site was a leftover from a previous attempt to fix the problem that was ultimately resolved with the no_site-based skip. I've removed the import.

erlend-aasland self-assigned this Feb 4, 2024

Copy link
Copy Markdown
Contributor

Are you ready to land this, @freakboy3742?

Copy link
Copy Markdown
Contributor Author

@erlend-aasland I'm ready if everyone else is :-)

Copy link
Copy Markdown
Contributor

AFAICS, @willingc's remarks have been addressed; the rest are thumbs up. Let's go :)

erlend-aasland merged commit 391659b into python:main Feb 5, 2024
freakboy3742 deleted the iOS-test-skips branch February 5, 2024 00:16
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…e on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
…e on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
Comment thread Lib/test/test_fcntl.py
Comment on lines +9 to +11
from test.support import (
cpython_only, get_pagesize, is_apple, requires_subprocess, verbose
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

You seem to do this change often. In the future, could you add a trailing comma, to make future diffs nicer?
(Or simply add another line if the current one gets too long:

from test.support import verbose, cpython_only, get_pagesize
from test.support import is_apple, requires_subprocess

)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@encukou Sure, no problem.

One of the issues I've hit is that the "preferred" style for imports varies wildly between files. I appreciate there's 30 years of historical baggage in the existing code - but is there a reason either of those two approaches is preferred over isort/black style syntax:

from test.support import (
    cpython_only, 
    get_pagesize, 
    is_apple, 
    requires_subprocess, 
    verbose,
)

Running black over every file I touch would make for unreadable patches; but if little black touches when the line is already being altered would be looked on favourably, then that's an easy tweak to make.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That works too -- there's a trailing comma, so future diffs won't need to add it.

(The 30 years of baggage also means there is no shared preference for stuff that isn't in PEP 8. I'm partial to repeating from <name> because it's searchable with grep -- you don't need a code analyzer -- but that's just personal opinion.)

if little black touches when the line is already being altered would be looked on favourably

Sure! As long as it helps readability :)

freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
…t suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 6, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
…t suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Oct 9, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
…t suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Feb 3, 2026
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Feb 3, 2026
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Feb 3, 2026
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Jun 12, 2026
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Jun 12, 2026
…st suite on iOS (python#114889)

Add test annotations required to run the test suite on iOS (PEP 730).

The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.

`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL