Skip to content

Report actual attempted Git command when Git.refresh fails #1812

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

Merged
merged 10 commits into from
Jan 26, 2024
Next Next commit
Split test_refresh into two tests
For when refreshing should succeed and when it should fail.
  • Loading branch information
EliahKagan committed Jan 24, 2024
commit ba4cbae2f5dcc417b5c09054b539d30b2ea1b33d
5 changes: 2 additions & 3 deletions test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,10 @@ def test_cmd_override(self):
):
self.assertRaises(GitCommandNotFound, self.git.version)

def test_refresh(self):
# Test a bad git path refresh.
def test_refresh_bad_git_path(self):
self.assertRaises(GitCommandNotFound, refresh, "yada")

# Test a good path refresh.
def test_refresh_good_git_path(self):
which_cmd = "where" if os.name == "nt" else "command -v"
path = os.popen("{0} git".format(which_cmd)).read().strip().split("\n")[0]
refresh(path)
Expand Down