FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

State what the refresh tests verify · gitpython-developers/GitPython@9b7e15f · GitHub

Commit 9b7e15f

Browse files
committed
State what the refresh tests verify
This adds short docstrings to each of the four refresh tests to briefly state the claims they verify.
1 parent 3bb63f3 commit 9b7e15f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎test/test_git.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ def test_cmd_override(self):
315315
self.assertRaises(GitCommandNotFound, self.git.version)
316316

317317
def test_refresh_bad_absolute_git_path(self):
318+
"""Bad absolute path arg is reported and not set."""
318319
absolute_path = str(Path("yada").absolute())
319320
expected_pattern = rf"\n[ \t]*cmdline: {re.escape(absolute_path)}\Z"
320321

@@ -324,6 +325,7 @@ def test_refresh_bad_absolute_git_path(self):
324325
self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, old_git_executable)
325326

326327
def test_refresh_bad_relative_git_path(self):
328+
"""Bad relative path arg is resolved to absolute path and reported, not set."""
327329
absolute_path = str(Path("yada").absolute())
328330
expected_pattern = rf"\n[ \t]*cmdline: {re.escape(absolute_path)}\Z"
329331

@@ -333,13 +335,15 @@ def test_refresh_bad_relative_git_path(self):
333335
self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, old_git_executable)
334336

335337
def test_refresh_good_absolute_git_path(self):
338+
"""Good absolute path arg is set."""
336339
absolute_path = shutil.which("git")
337340

338341
with _rollback_refresh():
339342
refresh(absolute_path)
340343
self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, absolute_path)
341344

342345
def test_refresh_good_relative_git_path(self):
346+
"""Good relative path arg is resolved to absolute path and set."""
343347
absolute_path = shutil.which("git")
344348
dirname, basename = osp.split(absolute_path)
345349

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL