Skip to content

Commit

Permalink
Run Pytest in installed package in Nix test
Browse files Browse the repository at this point in the history
Somehow this sidesteps the problem of plugins from `conftest.py` not
being available.
  • Loading branch information
akaihola committed Feb 26, 2024
1 parent dc3d0c8 commit 57d512a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ jobs:
python -m venv venv
source venv/bin/activate
pip install "${{needs.build-wheel.outputs.wheel-path}}[test]"
pytest
# Run tests in installed package to avoid plugin import issue:
pytest $(python -c "
import os, darker
print(os.path.dirname(darker.__file__))
")
' \
./default.nix
Expand Down

0 comments on commit 57d512a

Please sign in to comment.