Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The hook’s default file filter skips the main test suites, leaving nonconforming test names unchecked even with --all-files and failing to enforce the intended naming standard.
1 open issue
What changed in this PR
Adds a Python test-filename check to CloudStack’s existing pre-commit checks to help standardize test naming.
Changes:
- Enables the upstream
name-tests-testhook. - Sets
--pytest-test-firstto requiretest_*.pyfilenames for files selected by the hook.
| File | Description |
|---|---|
.pre-commit-config.yaml |
Adds and configures the Python test-naming hook. |
Review effort: Balanced
| - id: name-tests-test | ||
| args: [--pytest-test-first] |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #14716 +/- ##
=============================================
- Coverage 20.78% 3.86% -16.92%
=============================================
Files 6053 494 -5559
Lines 548230 42875 -505355
Branches 73237 8136 -65101
=============================================
- Hits 113928 1657 -112271
+ Misses 420955 40986 -379969
+ Partials 13347 232 -13115
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

… files are named correctly
https://github.com/pre-commit/pre-commit-hooks#name-tests-test
Description
This PR adds another basic check or test to ensure our Python test files are all standardised and namely correctly.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
prek run -aHow did you try to break this feature and the system with this change?