-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Test suite expects _stat extension to be available #108638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
* Fix test_inspect, test_pydoc, test_stat and test_tarfile when the _stat extension is missing. * Change the pure Python implementation of stat.filemode() for unknown file type: use "?", as done by the _stat.filemode().
Change the pure Python implementation of stat.filemode() for unknown file type: use "?", as done by the _stat.filemode(). test_stat skips TestFilemodeCStat if the _stat extension is missing.
Change the pure Python implementation of stat.filemode() for unknown file type: use "?", as done by the _stat.filemode(). test_stat skips TestFilemodeCStat if the _stat extension is missing.
Change the pure Python implementation of stat.filemode() for unknown file type: use "?", as done by the _stat.filemode(). test_stat skips TestFilemodeCStat if the _stat extension is missing.
Change the pure Python implementation of stat.filemode() for unknown file type: use "?", as done by the _stat.filemode(). test_stat skips TestFilemodeCStat if the _stat extension is missing.
Some time ago I opened the exact same issue, but about My PR was rejected :( |
pypy3 (PyPy 3.9.16 v7.3.12) doesn't have the |
Do you mean "PyPy doesn't have |
Oops, right:
|
Change the pure Python implementation of stat.filemode() for unknown file type: use "?", as done by the _stat.filemode(). test_stat skips TestFilemodeCStat if the _stat extension is missing.
Seems fixed now. |
test_inspect and test_pydoc still fail. I reopen the issue. I'm not sure if it's better to change _stat and/or stat functions signature, or skip the affected tests when _stat is not available. |
Whichever is the simplest fix, I'd say. |
Fix test_inspect and test_pydoc when the _stat extension is missing. Skip tests relying on _stat when _stat is missing.
Fix test_inspect and test_pydoc when the _stat extension is missing. Skip tests relying on _stat when _stat is missing.
Fix test_inspect and test_pydoc when the _stat extension is missing. Skip tests relying on _stat when _stat is missing.
The whole test suite now pass when the |
Bug report
Checklist
and am confident this bug has not been reported before
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
No response
A clear and concise description of the bug:
The
_stat
extension is specific to CPython. For example, PyPy has no_stat
module.But the Python test suite expects the
_stat
module to be available: test_inspect, test_pydoc, and test_tarfile fail with it's missing.Disable compilation of the
_stat
extension to reproduce the issue:Example:
Linked PRs
The text was updated successfully, but these errors were encountered: