Repository navigation
Conversation
Contributor
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
Comment on lines
+185
to
+186
| - 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% 20.78%
- Complexity 20857 20859 +2
=========================================
Files 6053 6053
Lines 548230 548230
Branches 73237 73237
=========================================
+ Hits 113928 113938 +10
+ Misses 420955 420944 -11
- Partials 13347 13348 +1
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:
|
jbampton
marked this pull request as draft
November 16, 2026 20:36
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

… 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?