Title: Tests using the same machine-wide resource should not run in parallel · Issue #156082 · python/cpython · GitHub
Open Graph Title: Tests using the same machine-wide resource should not run in parallel · Issue #156082 · python/cpython
X Title: Tests using the same machine-wide resource should not run in parallel · Issue #156082 · python/cpython
Description: Feature or enhancement Some resources which tests use are not per-process: the display, the sound device, the terminal. Two tests using one of them at the same time can interfere with each other, and regrtest runs test files in parallel ...
Open Graph Description: Feature or enhancement Some resources which tests use are not per-process: the display, the sound device, the terminal. Two tests using one of them at the same time can interfere with each other, a...
X Description: Feature or enhancement Some resources which tests use are not per-process: the display, the sound device, the terminal. Two tests using one of them at the same time can interfere with each other, a...
Opengraph URL: https://github.com/python/cpython/issues/156082
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tests using the same machine-wide resource should not run in parallel","articleBody":"# Feature or enhancement\n\nSome resources which tests use are not per-process: the display, the sound device, the terminal. Two tests using one of them at the same time can interfere with each other, and regrtest runs test files in parallel by default.\n\nOnly tests using the *same* resource conflict. A GUI test can run in parallel with any non-GUI test, so pausing all the other tests would be too much.\n\nThese resources are already named on the command line: `gui`, `audio`, `console` and `curses`. A test declares which one it needs with `requires()`, `requires_resource()` or, for the memory, `bigmemtest()`, so those functions could lock the resource for the duration of the test or of the test file. The ~50 GUI modules, `test_winsound`, `test_curses`, `test_winconsoleio` and the bigmem tests would need no change.\n\nThe cost is that such tests no longer overlap each other: running `test_tkinter`, `test_ttk` and `test_idle` with `-j4` takes as long as all three together (7.1 s here) instead of as long as the slowest (3.5 s). Tests which use no such resource keep running in parallel with them.\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-156902\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2026-08-20T07:13:40Z","url":"https://github.com/python/cpython/issues/156082"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06da8fde-1c69-d4b7-67e8-6d444e4782fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8404:1188C0:F839CC:14A0914:6B064C4D |
| html-safe-nonce | 255c9def181324810784f8cc616c5c136bc8833812c2d3e8074baf27cb563065 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDA0OjExODhDMDpGODM5Q0M6MTRBMDkxNDo2QjA2NEM0RCIsInZpc2l0b3JfaWQiOiI0NTE2MTk5NDA1MzU1MTU4NjA1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | de565ccc42fa2f01bcc1947302d63402b4fb10fb9cf40f03e6003da8ef05e458 |
| hovercard-subject-tag | issue:5200744682 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/156082/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8e5097076944d846526af84eae33f8b13585c4ff052d5e4a907029b362965cff/python/cpython/issues/156082 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8e5097076944d846526af84eae33f8b13585c4ff052d5e4a907029b362965cff/python/cpython/issues/156082 |
| og:image:alt | Feature or enhancement Some resources which tests use are not per-process: the display, the sound device, the terminal. Two tests using one of them at the same time can interfere with each other, a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f1f9a08f7c769a37f1dfc18ad43d463c222a7eea |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width