abc-classroom
abc-classroom copied to clipboard
Start at moving tests for git module ⚡️
This is ready for a review. I still am struggling to raise a filenotfound see #468 and also we need to resolve how we want to handle commit messages: see: #466
#466 #465 are related to this PR and could be addressed here as well potentially
i'm slowly updating docstrings as i write tests.
There is also a general question about some of the git / github functionality. it's easy to test git operations that don't hit github because authentication doesn't seem to be an issue. you can run git status for instance and it just works. But if we use SSH we can't really clone or pull without it benign setup and doing that on ci is tricky.
So one option is to have a suite of tests that only run locally. but even then pushing to a random repo seems a bit tricky too as it does require permissions that a new dev may not have. so i'm not sure how to do this without a good bit of mocking.
Codecov Report
Merging #462 (8059dd6) into main (f680b89) will increase coverage by
5.86%
. The diff coverage is99.09%
.
@@ Coverage Diff @@
## main #462 +/- ##
==========================================
+ Coverage 60.61% 66.48% +5.86%
==========================================
Files 20 20
Lines 1163 1265 +102
==========================================
+ Hits 705 841 +136
+ Misses 458 424 -34
Flag | Coverage Δ | |
---|---|---|
unittests | 66.48% <99.09%> (+5.86%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
abcclassroom/tests/test_git.py | 99.21% <99.07%> (-0.79%) |
:arrow_down: |
abcclassroom/git.py | 82.00% <100.00%> (+36.08%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f680b89...8059dd6. Read the comment docs.
consider pulling out updates to the code base vs tests...