René's URL Explorer Experiment


Title: Unify ways to run the Python test suite · Issue #109566 · python/cpython · GitHub

Open Graph Title: Unify ways to run the Python test suite · Issue #109566 · python/cpython

X Title: Unify ways to run the Python test suite · Issue #109566 · python/cpython

Description: There are at least 15 known ways to run the Python test suite. IMO it's too much, it's hard to keep all these code paths consistent. IMO python -m test should be enough to fit all use cases. Maybe we need a --ci, --buildbot, or --strict ...

Open Graph Description: There are at least 15 known ways to run the Python test suite. IMO it's too much, it's hard to keep all these code paths consistent. IMO python -m test should be enough to fit all use cases. Maybe ...

X Description: There are at least 15 known ways to run the Python test suite. IMO it's too much, it's hard to keep all these code paths consistent. IMO python -m test should be enough to fit all use cases...

Opengraph URL: https://github.com/python/cpython/issues/109566

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unify ways to run the Python test suite","articleBody":"There are at least 15 known ways to run the Python test suite. IMO it's too much, it's hard to keep all these code paths consistent. IMO ``python -m test`` should be enough to fit all use cases.\r\n\r\nMaybe we need a ``--ci``, ``--buildbot``, or ``--strict`` option which would run tests is \"strict\" mode.\r\n\r\n---\r\n\r\nPortable way to run tests:\r\n\r\n```\r\n./python -m test\r\n./python -m test.regrtest\r\n./python -m test.libregrtest\r\n./python -m test.autotest\r\n\r\n./python Lib/test/regrtest.py\r\n./python Lib/test/autotest.py\r\n\r\n./python -c 'from test import autotest'\r\n```\r\n\r\nThe main drawback is that running ``./python`` doesn't work when Python is built with ``./configure --enable-shared``, and it doesn't work when Python is cross-compiled (WASM/WASI buildbots). Moreover, on macOS, ``./python.exe`` must be run instead. On Windows, it's just ``python``.\r\n\r\nUnix, from Python source code:\r\n\r\n```\r\nmake buildbottest TESTOPTS=\"...\"\r\nmake test\r\nmake testall\r\nmake testuniversal\r\nmake hostrunnertest\r\n\r\n./python Tools/scripts/run_tests.py\r\n```\r\n\r\nWindows, from Python source code:\r\n\r\n```\r\nPCbuild\\rt.bat\r\nTools\\buildbot\\test.bat\r\n```\r\n\r\n---\r\n\r\n* Lib/test/autotest.py just runs ``test.libregrtest.main()``.\r\n* Lib/test/regrtest.py runs ``test.libregrtest.main()`` **and** remove ``Lib/test/`` from ``sys.path`` **and** make ``__file__`` an absolute path.\r\n* ``PCbuild\\rt.bat``:\r\n\r\n  * python: pass ``-u -Wd -E -bb`` options\r\n  * regrtest: pass options passed to ``rt.bat`` (except of options specific to rt.bat)\r\n  * most options are to get the path to the python.exe program in PCbuild/\r\n\r\n* ``Tools\\buildbot\\test.bat`` runs ``PCbuild\\rt.bat``:\r\n\r\n  * ``rt.bat``: pass ``-q -d`` options.\r\n  * regrtest: pass ``-j1 -uall -rwW --slowest --timeout=1200 --fail-env-changed`` options.\r\n  * ARM32 SSH pass ``-unetwork -udecimal -usubprocess -uurlfetch -utzdata -rwW --slowest --timeout=1200 --fail-env-changed`` options.\r\n\r\n* ``make buildbottest`` runs ``Tools/scripts/run_tests.py``:\r\n\r\n  * python: pass ``$(TESTPYTHONOPTS)`` options.\r\n  * regrtest: pass ``-j 1 -u all -W --slowest --fail-env-changed --timeout=$(TESTTIMEOUT) $(TESTOPTS)`` options.\r\n\r\n* ``Tools/scripts/run_tests.py``:\r\n\r\n  * python: pass ``-u -W default -bb -E`` options -- also cross-compilation options, not detailed here\r\n  * regrtest: pass ``-r -w -j0 -u all,-largefile,-audio,-gui`` options, add ``-n`` on Windows.\r\n\r\n---\r\n\r\nGitHub Action workflow uses, [.github/workflows/build.yml](https://github.com/python/cpython/blob/afa7b0d743d9b7172d58d1e4c28da8324b9be2eb/.github/workflows/build.yml):\r\n\r\n* Windows x86: ``.\\PCbuild\\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0``\r\n* Windows x64: ``.\\PCbuild\\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0``\r\n* macOS: ``make buildbottest TESTOPTS=\"-j4 -uall,-cpu\"``\r\n* Ubuntu: ``xvfb-run make buildbottest TESTOPTS=\"-j4 -uall,-cpu\"``\r\n* Address Sanitizer: ``xvfb-run make buildbottest TESTOPTS=\"-j4 -uall,-cpu\"``\r\n\r\nBuildbot use, [master/custom/factories.py](https://github.com/python/buildmaster-config/blob/0fbab0b010c8d24145e304505463bdf562439d85/master/custom/factories.py):\r\n\r\n* UnixBuild and UnixCrossBuild: ``make buildbottest TESTOPTS=\"...\" TESTPYTHONOPTS=\"...\" TESTTIMEOUT=\"...\"`` with code to select TESTOPTS, TESTPYTHONOPTS and TESTTIMEOUT.\r\n* UnixInstalledBuild: ``/path/to/python -m test ...`` with code to select ``-m test`` options.\r\n* BaseWindowsBuild: ``Tools\\buildbot\\test.bat ...`` with code to select ``....`` options\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-109567\n* gh-109570\n* gh-109701\n* gh-109909\n* gh-109926\n* gh-109954\n* gh-109969\n* gh-110062\n* gh-110120\n* gh-110121\n* gh-110122\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2023-09-19T10:28:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/109566/cpython/issues/109566"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:90a68546-10cb-00bd-f8e6-a463f4a64ceb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id886C:284320:2C287:39D7F:696B3153
html-safe-noncee703db2d6f0eab21afa356368a48e19c32d668fcf82d0a37a54d23cb91c5306d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODZDOjI4NDMyMDoyQzI4NzozOUQ3Rjo2OTZCMzE1MyIsInZpc2l0b3JfaWQiOiI4MTUzODE1NDA2ODUwMjkwMDAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac290c4447edad8e86d4d6a854368801fb608d8f49ef9b5c8f92d41bf6ebdf1fa9
hovercard-subject-tagissue:1902675733
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/109566/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e02ddf6c3bcb06d0544ba8db78542139b806f18eb63cf3e5f9612599efce8ec2/python/cpython/issues/109566
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e02ddf6c3bcb06d0544ba8db78542139b806f18eb63cf3e5f9612599efce8ec2/python/cpython/issues/109566
og:image:altThere are at least 15 known ways to run the Python test suite. IMO it's too much, it's hard to keep all these code paths consistent. IMO python -m test should be enough to fit all use cases. Maybe ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/109566#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F109566
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F109566
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/109566
Reloadhttps://github.com/python/cpython/issues/109566
Reloadhttps://github.com/python/cpython/issues/109566
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/109566
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/109566
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/109566
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/109566
Unify ways to run the Python test suitehttps://github.com/python/cpython/issues/109566#top
testsTests in the Lib/test dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22tests%22
https://github.com/vstinner
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Sep 19, 2023https://github.com/python/cpython/issues/109566#issue-1902675733
.github/workflows/build.ymlhttps://github.com/python/cpython/blob/afa7b0d743d9b7172d58d1e4c28da8324b9be2eb/.github/workflows/build.yml
master/custom/factories.pyhttps://github.com/python/buildmaster-config/blob/0fbab0b010c8d24145e304505463bdf562439d85/master/custom/factories.py
gh-109566: Run buildbot tests with --fail-rerun #109567https://github.com/python/cpython/pull/109567
gh-109566, regrtest: Add --fast-ci and --slow-ci options #109570https://github.com/python/cpython/pull/109570
gh-109566: Fix typo in PCbuild/rt.bat #109701https://github.com/python/cpython/pull/109701
gh-109566: regrtest reexecutes the process #109909https://github.com/python/cpython/pull/109909
gh-109566: Fix regrtest code adding Python options #109926https://github.com/python/cpython/pull/109926
gh-109566: Fix regrtest Python options for WASM/WASI #109954https://github.com/python/cpython/pull/109954
gh-109566: regrtest doesn't enable --rerun if --python is used #109969https://github.com/python/cpython/pull/109969
gh-109566: regrtest _add_python_opts() handles KeyboardInterrupt #110062https://github.com/python/cpython/pull/110062
gh-109566: PCbuild/rt.bat now uses --fast-ci #110120https://github.com/python/cpython/pull/110120
gh-109566: regrtest --fast-ci no longer enables --nowindow #110121https://github.com/python/cpython/pull/110121
gh-109566: Remove make testall #110122https://github.com/python/cpython/pull/110122
testsTests in the Lib/test dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22tests%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.