-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
test_pyexpat: test_exception() fails on Ubuntu and macOS jobs on GitHub Actions #109230
Comments
Oh wait. Maybe it's a real bug in my PR #109229. |
Oh. This test depends on the current working directory! If it's run from the source directory, it pass.
If it's run from a different directory, it fails!
|
The test checks that the traceback module is able to read a line of the Python C code in Quickly, the test was skipped if sysconfig.is_python_build() is false: commit 2b3b95b. In 2022, the test was skipped on WASM and Win32 ARM: commit 96b344c. These two platforms build Python with cross-compilation: the target Python doesn't have access to Python C source code. A minor follow-up also skipped the test on WASI: commit 9b50585. IMO the condition to decide to skip the test or not is weak. And the test should not depend on which directory tests are run. |
Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Moreover, skip the test if Modules/pyexpat.c doesn't exist and other Python implementations other than CPython.
Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython.
My PR makes the issue easier to reproduce since running the Python test suite with |
Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython.
…109233) Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython.
…ory (pythonGH-109233) Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython. (cherry picked from commit e55aab9) Co-authored-by: Victor Stinner <vstinner@python.org>
…ory (pythonGH-109233) Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython. (cherry picked from commit e55aab9) Co-authored-by: Victor Stinner <vstinner@python.org>
…tory (GH-109233) (#109242) gh-109230: test_pyexpat no longer depends on the current directory (GH-109233) Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython. (cherry picked from commit e55aab9) Co-authored-by: Victor Stinner <vstinner@python.org>
…tory (GH-109233) (#109241) gh-109230: test_pyexpat no longer depends on the current directory (GH-109233) Fix test_pyexpat.test_exception(): it can now be run from a directory different than Python source code directory. Before, the test failed in this case. Skip the test if Modules/pyexpat.c source is not available. Skip also the test on Python implementations other than CPython. (cherry picked from commit e55aab9) Co-authored-by: Victor Stinner <vstinner@python.org>
Comparison of Ubuntu logs:
before (ok): https://github.com/python/cpython/actions/runs/6134648048/job/16647654038
checking for --with-system-expat... no
expat.EXPAT_VERSION: expat_2.5.0
after (error): https://github.com/python/cpython/actions/runs/6138224249/job/16654899227?pr=109229 -- PR
checking for --with-system-expat... no
expat.EXPAT_VERSION: expat_2.5.0
Linked PRs
The text was updated successfully, but these errors were encountered: