tests: fixes all warnings#1746
Merged
noirbizarre merged 2 commits intocommitizen-tools:masterfrom Jan 3, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1746 +/- ##
==========================================
- Coverage 97.92% 97.88% -0.04%
==========================================
Files 60 60
Lines 2604 2604
==========================================
- Hits 2550 2549 -1
- Misses 54 55 +1 ☔ View full report in Codecov by Sentry. |
Lee-W
reviewed
Dec 30, 2025
Member
Lee-W
left a comment
There was a problem hiding this comment.
This PR is awesome! Just browsed through it Left a few nits and need some time to take a deeper look
72047ac to
7ffbdb3
Compare
Member
Author
|
PR updated with all changes 👍🏼 |
tests/commands/test_changelog_command/test_changelog_config_flag_merge_prerelease_alpha_.md
Show resolved
Hide resolved
…for_tag()` function, removing the associated warnings
7ffbdb3 to
77c20c7
Compare
bearomorphism
approved these changes
Jan 3, 2026
1 task
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.
Description
This PR fixes all raised warnings during tests (making it easier to read actual errors).
Moving from 30 warnings and a duration of ~40s:
to no warnings for a duration of less than 10s:
The time gained is because we don't rely on
sleepanymore.Checklist
Code Changes
pyproject.tomlutil: UtilFixturehelper (freeze time withFreezeGunonce required):cli(*args)helper also time-controlled (underlying git operations have the time frozen too). Reduce the amount of boilerplate to execute the cli during testswait_for_tagintest_changelog_command.py(the only one still depending onwait_for_tag)test_changelog_command(all but those based on legacy pytesttmpdir/py.path.localtype which is badly typed)1970-01-01)The fixtures has not yet replaced helpers in other tests to reduce the size of the PR (will be done in separate pull requests)
Documentation Changes
None
Expected Behavior
Faster (no sleep) and fully deterministic (full control over time) tests execution.
Cleaner output (no more pages of warnings)
Easier to maintain tests
Steps to Test This Pull Request
Execute
poetry testonmasterand this branch to observe the differences of execution (speed and output).Additional Context
This was a long task but this was also (IMHO) required to make it easier to maintain tests on long term.
I'll update other test files when this one is merged
Fixes #1623