-
-
Notifications
You must be signed in to change notification settings - Fork 289
test(cz_customize): add missing YAML configuration file tests #1516
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Adrian DC <radian.dc@gmail.com>
> commitizen.exceptions.InvalidConfigurationError: Failed to parse not_exist.yaml: while scanning a double-quoted scalar > found unknown escape character 's' Signed-off-by: Adrian DC <radian.dc@gmail.com>
> test_commit_parser[config2] - AssertionError: > assert '(?P<message>.*)' == '^(?P<change_...<message>.*)?' > test_changelog_pattern[config2] - AssertionError: > assert '.*' == '^(feature|bug fix)?(!)?' > test_change_type_map[config2] - AssertionError: > assert None == {'bug fix': 'Fix', 'feature': 'Feat'} Signed-off-by: Adrian DC <radian.dc@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1516 +/- ##
==========================================
+ Coverage 97.33% 97.66% +0.32%
==========================================
Files 42 57 +15
Lines 2104 2653 +549
==========================================
+ Hits 2048 2591 +543
- Misses 56 62 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Adrian DC <radian.dc@gmail.com>
message_template: '{{change_type}}:{% if show_message %} {{message}}{% endif %}' | ||
example: 'feature: this feature enable customize through config file' | ||
schema: "<type>: <body>" | ||
schema_pattern: "(feature|bug fix):(\\s.*)" | ||
bump_pattern: "^(break|new|fix|hotfix)" | ||
commit_parser: "^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?" | ||
changelog_pattern: "^(feature|bug fix)?(!)?" | ||
schema: '<type>: <body>' | ||
schema_pattern: '(feature|bug fix):(\\s.*)' | ||
bump_pattern: '^(break|new|fix|hotfix)' | ||
commit_parser: '^(?P<change_type>feature|bug fix):\\s(?P<message>.*)?' | ||
changelog_pattern: '^(feature|bug fix)?(!)?' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we need to change it 🤔
@@ -125,7 +125,7 @@ commitizen: | |||
new: MINOR | |||
fix: PATCH | |||
hotfix: PATCH | |||
change_type_order: ["BREAKING CHANGE", "feat", "fix", "refactor", "perf"] | |||
change_type_order: ['BREAKING CHANGE', 'feat', 'fix', 'refactor', 'perf'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
|
||
commit_mock = mocker.patch("commitizen.git.commit") | ||
commit_mock.return_value = cmd.Command( | ||
'nothing added to commit but untracked files present (use "git add" to track)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might encounter issue if the language is not set to en_US. probably worth setting it up for this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idea looks good. left some nitpicks
Partial rebase of #1207 for tests commits made last summer.