Skip to content

Commit

Permalink
CI: run pytest without arguments to avoid stdlib distutils being impo…
Browse files Browse the repository at this point in the history
…rted

distutils currently doesn't support pytest collection that doesn't
start at least at the distutils dir or above (and not distutils/tests)
since it requires the local distutils being imported before the tests are run,
otherwise the stdlib distutils takes precedence.

Adjust the pytest call to not pass a path to work around this.

Since pytest currently fails to skip collecting venvs with mingw python
(see pytest-dev/pytest#12544) move the venv
to /tmp instead.
  • Loading branch information
lazka authored and jaraco committed Jun 28, 2024
1 parent 066ef49 commit 1c196fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ jobs:
run: |
export VIRTUALENV_NO_SETUPTOOLS=1
python -m virtualenv venv
source venv/bin/activate
python -m virtualenv /tmp/venv
source /tmp/venv/bin/activate
# python-ruff doesn't work without rust
sed -i '/pytest-ruff/d' pyproject.toml
Expand All @@ -156,8 +156,8 @@ jobs:
- name: Run tests
shell: msys2 {0}
run: |
source venv/bin/activate
pytest distutils/tests
source /tmp/venv/bin/activate
pytest
ci_setuptools:
# Integration testing with setuptools
Expand Down

0 comments on commit 1c196fe

Please sign in to comment.