You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pre-commit by default passes the changed files as arguments. If you're changing non-test files, then pytest will be invoked as pytest non-test-file.py and will discover zero tests and exit with code 5 (nonzero).
Pre-commit passes the list of changed files to pytest; if these are
non-test files, then no tests are found, and the command fails.
Configure pre-commit to always run pytest with no arguments.
See also:
pre-commit/pre-commit#1130
example repo: https://github.com/zirpu/decimal_time
I can run pytest fine, but trying to commit gives me:
Pytest runs fine with:
I cannot find a way to get more info from pre-commit and pytest, pointers appreciated.
The text was updated successfully, but these errors were encountered: