feat: Add 'name-tests-test' to pre-commit hooks example#231
Conversation
|
A few thoughts:
|
|
Hmm, this will still say "tests should end in _test.py" even if you pass a flag. I was going to write:
on Anthony's discord, but then found pre-commit/pre-commit-hooks#712 - it seems this is a very old hook and there is a history here. I'm thinking it might not provide enough benefit to add. |
Agreed! This alias is actually really new as it was added in pre-commit/pre-commit-hooks#779 (15 days ago) and I learned about and added the
You'd have to take that up with Anthony. Though he notes in pre-commit/pre-commit-hooks#712 (comment) that
I agree with you though that
makes more sense as a user.
Looking at the code in |
That's strange. Using the |
|
Also scikit-hep/pyhf#1892 is passing. Did you update https://github.com/pre-commit/pre-commit-hooks to |
* Add the 'name-tests-test' pre-commit hooks which verifies that test files under tests/ conform to pytest naming conventions. - Use the '--pytest-test-first' option to match the 'test_.*\.py' naming convention.
6381ab7 to
e60aa39
Compare
|
The title looks okay, maybe that was from an old version? Okay, I think this is fine. |
Thanks for the review. 🙂 In your opinion is this fine to merge, or for the website and recommendations do you want second sign-offs from another member? |
|
No, one's fine IMO. |
Resolves #227
tests/conform topytestnaming conventions.--pytest-test-firstoption to match thetest_.*\.pynaming convention.