commitizen
commitizen copied to clipboard
test(git): add a test for handling blank with path in git commit
related: #572
Description
add-a-test-for-handling-blank-with-path-in-git-commit
- mock action:
Whether the path includes blank or not, the git commit action can parse anyway and correctly execute
commit
under commitizen/commitizen/git.py and go through the util functioncreate_file_and_commit
Checklist
- [x] Add test cases to all the changes you introduce
- [x] Run
./scripts/format
and./scripts/test
locally to ensure this change passes linter check and test - [x] Test the changes on the local machine manually
- [ ] Update the documentation for the changes
Expected behavior
if the project path is including blank, the program should work.
Steps to Test This Pull Request
run ./scripts/test
or run the single text test_git_commit_command_with_varied_paths_handles_blank
under tests/test_git.py
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.48%. Comparing base (
120d514
) to head (ef51f24
). Report is 254 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1044 +/- ##
==========================================
+ Coverage 97.33% 97.48% +0.15%
==========================================
Files 42 55 +13
Lines 2104 2429 +325
==========================================
+ Hits 2048 2368 +320
- Misses 56 61 +5
Flag | Coverage Δ | |
---|---|---|
unittests | 97.48% <ø> (+0.15%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.