Skip to content

Commit a100e3b

Browse files
committed
CI: run pytest without arguments to avoid stdlib distutils being imported
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.
1 parent 5fb38a1 commit a100e3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ jobs:
146146
run: |
147147
export VIRTUALENV_NO_SETUPTOOLS=1
148148
149-
python -m virtualenv venv
150-
source venv/bin/activate
149+
python -m virtualenv /tmp/venv
150+
source /tmp/venv/bin/activate
151151
152152
# python-ruff doesn't work without rust
153153
sed -i '/pytest-ruff/d' pyproject.toml
@@ -156,8 +156,8 @@ jobs:
156156
- name: Run tests
157157
shell: msys2 {0}
158158
run: |
159-
source venv/bin/activate
160-
pytest distutils/tests
159+
source /tmp/venv/bin/activate
160+
pytest
161161
162162
ci_setuptools:
163163
# Integration testing with setuptools

0 commit comments

Comments
 (0)