Skip to content

refactor(init): code cleanup and better test coverage #1424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bearomorphism
Copy link
Contributor

@bearomorphism bearomorphism commented May 17, 2025

Description

Checklist

Code Changes

  • Add test cases to all the changes you introduce
  • Run poetry all locally to ensure this change passes linter check and tests
  • Manually test the changes:
    • Verify the feature/bug fix works as expected in real-world scenarios
    • Test edge cases and error conditions
    • Ensure backward compatibility is maintained
    • Document any manual testing steps performed
  • Update the documentation for the changes

Documentation Changes

  • Run poetry doc locally to ensure the documentation pages renders correctly

Expected Behavior

Steps to Test This Pull Request

Additional Context

Copy link

codecov bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.12%. Comparing base (120d514) to head (c028883).
Report is 610 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1424      +/-   ##
==========================================
+ Coverage   97.33%   98.12%   +0.78%     
==========================================
  Files          42       57      +15     
  Lines        2104     2661     +557     
==========================================
+ Hits         2048     2611     +563     
+ Misses         56       50       -6     
Flag Coverage Δ
unittests 98.12% <100.00%> (+0.78%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


commands.Init(config)()
check_cz_config(default_choice)
# check that config is not duplicated
check_pre_commit_config([cz_hook_config])
check_pre_commit_config([CZ_HOOK_CONFIG])


class TestNoPreCommitInstalled:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_pre_commit_not_installed is not working as expected...

"update_changelog_on_bump = true\n"
"major_version_zero = true\n"
'version = "0.0.1"\n'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the order of these configs matter here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant