-
Notifications
You must be signed in to change notification settings - Fork 84
Meson editable install: pytest --pyargs does not collect any tests #568
Copy link
Copy link
Closed
Milestone
Description
To reproduce
mkdir -p ~/venvs
rm -rf ~/venvs/test-env
python -m venv ~/venvs/test-env
pip install scipy joblib threadpoolctl cython meson-python ninja pytest
git clone https://github.com/scikit-learn/scikit-learn --depth 1
cd scikit-learn
make dev-meson
# go outside of repo root (with pytest 8 it fails also in the repo root)
cd
pytest --pyargs sklearn --collect-onlyOutput shows "no tests collected in 0.10s". Without --pyargs, this works fine, pytest sklearn --collect-only shows ~33k tests.
I checked that numpy has the same issue, so this is not specific to scikit-learn
Could this be related to #557? I have to check I haven't taken the time to confirm it yet. Actually I checked with @ogrisel branch from #562 and it seems to collect tests fine, so this seems related.
Full disclosure: with pytest<8, tests are collected if you stay in the repo root. I believe this is kind of by chance, since pytest 8 has introduced collection behaviour changes/fixes see https://docs.pytest.org/en/stable/changelog.html#collection-changes for more details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels