FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[WIP] Fix Windows tests by egpbos · Pull Request #342 · NLeSC/python-template · GitHub

[WIP] Fix Windows tests - #342

Merged
egpbos merged 1 commit into
mainfrom
fix_326_windows_tests_pip_install_user
Jul 10, 2023
Merged

[WIP] Fix Windows tests#342
egpbos merged 1 commit into
mainfrom
fix_326_windows_tests_pip_install_user

Conversation

egpbos commented Jun 8, 2023

Copy link
Copy Markdown
Collaborator

Trying to fix #326, don't merge, I'm just using this PR to run CI, because I don't have Windows locally.

egpbos requested a review from sverhoeven June 8, 2023 16:55
egpbos force-pushed the fix_326_windows_tests_pip_install_user branch from 7616a0f to d5e299d Compare June 9, 2023 10:48

egpbos commented Jun 9, 2023

Copy link
Copy Markdown
Collaborator Author

Ready for review @sverhoeven, @bvreede

egpbos requested a review from bvreede June 9, 2023 10:49
Everywhere: on CI, in tests, in docs. Also, we replace bare pip/pip3 and pytest calls with python -m pip and python -m pytest respectively, to make sure we always use the same python executable everywhere.

This fixes #326 (failing Windows tests on CI), because the `python3` executable causes issues (it is not properly copied into the venv directory by venv, which is a CPython bug, see python/cpython#87915), while the python executable does work; see e.g. here https://stackoverflow.com/questions/61669873/python-venv-env-fails-winerror-2-the-system-cannot-find-the-file-specified. `python` should be the same executable under the hood as `python3`, if the setup-python action works as expected, at least.
It also allows us to remove the IS_WINDOWS_CI special case.

Failed attempts at fixing #326 included:
- Setting the shells (assuming something went wrong with environment
  variables)
- Using full paths for both the executable and the venv directory in the
  template test suite.
egpbos force-pushed the fix_326_windows_tests_pip_install_user branch from d5e299d to 9686cf7 Compare June 9, 2023 10:52

egpbos commented Jun 9, 2023

Copy link
Copy Markdown
Collaborator Author

(one more force push, I accidentally rebased a previous commit)

bvreede left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It works!
Very happy for this to be merged.

egpbos merged commit 38c16d9 into main Jul 10, 2023
sjvrijn deleted the fix_326_windows_tests_pip_install_user branch May 3, 2024 22:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests are failing on Windows with Python > 3.6

2 participants


Back | FazBrowse Home | New Git URL