Skip to content
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