-
Notifications
You must be signed in to change notification settings - Fork 21
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
Start at moving tests for git module ⚡️ #462
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
abcclassroom/tests/test_git.py
Outdated
assert captured_output[0].startswith("Encountered this error") | ||
|
||
|
||
# NOTE: Updated to run git status so it works universally |
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.
@kcranston there is a bigger question here about how much we mock. Right now the big stumbling block is ssh setup for git clone
but here i mean git status is easy to just run. Because you run git commit below and it's fine i may update this test to avoid any mocks.
# and you try to run _call_git? | ||
|
||
|
||
def test_clone_repo_pass(monkeypatch, example_student_repo, capsys, tmp_path): |
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.
this could run IF we could figure out authentication. i really do not understand how to do that part in a way that it works on ci.
consider pulling out updates to the code base vs tests... |
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.