Title: Running "tests/runtests.py" on Windows · Issue #13936 · python/typeshed · GitHub
Open Graph Title: Running "tests/runtests.py" on Windows · Issue #13936 · python/typeshed
X Title: Running "tests/runtests.py" on Windows · Issue #13936 · python/typeshed
Description: (.venv) C:\clones\typeshed>tests\runtests -h usage: runtests.py [-h] [--run-stubtest] [--python-version {3.9,3.10,3.11,3.12,3.13}] path positional arguments: path Path of the stub to test in format
Open Graph Description: (.venv) C:\clones\typeshed>tests\runtests -h usage: runtests.py [-h] [--run-stubtest] [--python-version {3.9,3.10,3.11,3.12,3.13}] path positional arguments: path Path of the stub to test in format...
X Description: (.venv) C:\clones\typeshed>tests\runtests -h usage: runtests.py [-h] [--run-stubtest] [--python-version {3.9,3.10,3.11,3.12,3.13}] path positional arguments: path Path of the stub to test in for...
Opengraph URL: https://github.com/python/typeshed/issues/13936
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Running \"tests/runtests.py\" on Windows","articleBody":"```cmd\n(.venv) C:\\clones\\typeshed>tests\\runtests -h\nusage: runtests.py [-h] [--run-stubtest] [--python-version {3.9,3.10,3.11,3.12,3.13}] path\n\npositional arguments:\n path Path of the stub to test in format \u003cfolder>/\u003cstub>, from the root of the project.\n\n...\n\n(.venv) C:\\clones\\typeshed>tests\\runtests.py /clones/typeshed/stdlib/ast.pyi \nusage: runtests.py [-h] [--run-stubtest] [--python-version {3.9,3.10,3.11,3.12,3.13}] path\nruntests.py: error: 'path' argument should be in format \u003cfolder>/\u003cstub>.\n\n```\n\nOh, oops!\n```cmd\n\n(.venv) C:\\clones\\typeshed>tests\\runtests.py stdlib/ast.pyi\n\n...\n\n--- TEST SUMMARY: One or more tests failed. See above for details. ---\n\npre-commit Success\nCheck structure: Success\nPyright: Success\nmypy: Success\nstubtest: Success\npytype: Failed\nPyright regression tests: Success\nmypy regression test: Success\n```\n\nI troubleshoot for at least two hours, [including](https://github.com/python/typeshed/blob/a4d3f6f0de94d0beb98cb478eb031aecf5badce9/lib/ts_utils/paths.py#L6) reinstalling venv and installing editable ts_utils.\n```python\n\n# to typeshed. Installing ts_utils editable would solve that, see\n\n```\n\nNow, pytype passes if I run it directly.\n```cmd\n\n(.venv) C:\\clones\\typeshed\\tests>pytype_test.py --print-stderr --typeshed-location /clones/typeshed \\clones\\typeshed\\stdlib\\ast.pyi \nTesting files with pytype...\nRan pytype with 1 pyis, got 0 errors.\n\n```\n\n# The solution\nAfter another 30 minutes, I am able to get:\n```cmd\n\n(.venv) C:\\clones\\typeshed>tests\\runtests.py stdlib\\ast.pyi\n\n...\n\n--- TEST SUMMARY: All tests passed! ---\n\npre-commit Success\nCheck structure: Success\nPyright: Success\nmypy: Success\nstubtest: Success\npytype: Success\nPyright regression tests: Success\nmypy regression test: Success\n```\n\nThat was the solution. I didn't need to spend all that time troubleshooting and reinstalling.\n\n```python\n\nfrom pathlib import PurePath\n\nprint(f\"...in format {PurePath('\u003cfolder>', '\u003cstub>')}\")\n\nimport os.path\n\nprint(f\"...in format \u003cfolder>{os.path.sep}\u003cstub>\")\n\n```\n\n```cmd\n(.venv) C:\\clones\\typeshed>C:\\clones\\typeshed\\.venv\\Scripts\\python.exe c:/clones/typeshed/pp.py\n...in format \u003cfolder>\\\u003cstub>\n...in format \u003cfolder>\\\u003cstub>\n```\n\n[How it looks on Linux-->](https://colab.research.google.com/drive/1CRvxMx9JR51XD8AtNwz2UWQaCNF6sn2c?usp=sharing)\n\nI prefer `pathlib` because it's a little more semantic. ","author":{"url":"https://github.com/hunterhogan","@type":"Person","name":"hunterhogan"},"datePublished":"2025-05-04T04:13:25Z","url":"https://github.com/python/typeshed/issues/13936"}
| 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:e9915afe-483a-1834-1242-ce819474c7c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E378:197995:2016887:2B7A97C:6B001B0A |
| html-safe-nonce | bfee9f92e1dac00ed963fd7280b445cd98b26ad4ade7ad7c7e8aead4a29b2382 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzc4OjE5Nzk5NToyMDE2ODg3OjJCN0E5N0M6NkIwMDFCMEEiLCJ2aXNpdG9yX2lkIjoiMjU5MzExNzU2MzY2MzY4NjQxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f81f2dd7bb1165a539b28270dfc6e4a3257ae240185520abd0d18a140e54c369 |
| hovercard-subject-tag | issue:3037764733 |
| 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/typeshed/13936/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b7a8c78f5b001023697b6707dda6355d8141fb35cfa3e11de38d94f3b1884fa4/python/typeshed/issues/13936 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b7a8c78f5b001023697b6707dda6355d8141fb35cfa3e11de38d94f3b1884fa4/python/typeshed/issues/13936 |
| og:image:alt | (.venv) C:\clones\typeshed>tests\runtests -h usage: runtests.py [-h] [--run-stubtest] [--python-version {3.9,3.10,3.11,3.12,3.13}] path positional arguments: path Path of the stub to test in format... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hunterhogan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width