MrPowers/mack

Validate pre-commit config for pytest

cs23andris opened this issue ยท 5 comments

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/.

@cs23andris good catch! Would you like to contribute?

Yes @robertkossendey, you can assign to me!

Great, thank you @cs23andris!

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 ?

@cs23andris - thanks for reporting back, closing.