refactor: remove duplicate test classes and fix import style issues#354
Merged
shenxianpeng merged 3 commits intofeature/add-testsfrom Jan 31, 2026
Merged
refactor: remove duplicate test classes and fix import style issues#354shenxianpeng merged 3 commits intofeature/add-testsfrom
shenxianpeng merged 3 commits intofeature/add-testsfrom
Conversation
Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update pre-commit configuration and enhance test coverage
refactor: remove duplicate test classes and fix import style issues
Jan 31, 2026
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the
Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/add-tests #354 +/- ##
=====================================================
- Coverage 93.65% 93.51% -0.15%
=====================================================
Files 8 8
Lines 694 694
=====================================================
- Hits 650 649 -1
- Misses 44 45 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
shenxianpeng
approved these changes
Jan 31, 2026
shenxianpeng
added a commit
that referenced
this pull request
Jan 31, 2026
* feat: Update pre-commit configuration and enhance test coverage * refactor: remove duplicate test classes and fix import style issues (#354) * Initial plan * refactor: remove duplicate test classes and fix code style issues Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com> * chore: Add 'copilot' to allowed branch types --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com> Co-authored-by: Xianpeng Shen <xianpeng.shen@gmail.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: shenxianpeng <3353385+shenxianpeng@users.noreply.github.com>
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.



Addresses code review feedback identifying duplicate test coverage and inconsistent import patterns.
Changes
Removed duplicate test classes in
tests/engine_test.py(316 lines):TestComprehensive*classes duplicated existing test coverage forValidationResult,ValidationContext,CommitMessageValidator,SubjectCapitalizationValidator,SubjectImperativeValidator,SubjectLengthValidator, andValidationEnginetest_validation_engine_validator_maptest by moving it to existingTestValidationEngineclassFixed import style in
tests/config_test.py:side_effect=lambda name, *args: self._mock_import_error(name, *args)→side_effect=self._mock_import_errorimport commit_check.config as config→from commit_check.config import toml_loadto match module-level importsAll 83 tests pass. Net reduction: 290 lines.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.