Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b7e15f

Browse files
committed
State what the refresh tests verify
This adds short docstrings to each of the four refresh tests tobriefly state the claims they verify.
1 parent3bb63f3 commit9b7e15f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎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
deftest_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
deftest_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
deftest_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
deftest_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)

[8]ページ先頭

©2009-2025 Movatter.jp