Validate pre-commit config for pytest
cs23andris opened this issue ยท 5 comments
cs23andris commented
This is the current setup for pytest in the .yaml file
- repo: local
hooks:
- id: pytest
name: pytest
entry: pytest tests/
pass_filenames: false
language: system
To leverage the development environment setup by poetry for for this hook then the entry key should be updated: poetry run pytest
instead of pytest tests/
.
robertkossendey commented
@cs23andris good catch! Would you like to contribute?
cs23andris commented
Yes @robertkossendey, you can assign to me!
robertkossendey commented
Great, thank you @cs23andris!
cs23andris commented
So on second thought, If I run the hooks from inside the container with the command: poetry run pre-commit run --all-files
then pytest hook is using the poetry environment, so I guess this issue is not relevant anymore.
Can I close this @robertkossendey ?
MrPowers commented
@cs23andris - thanks for reporting back, closing.