| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3bb63f3 commit 9b7e15f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -315,6 +315,7 @@ def test_cmd_override(self): | |||
| 315 | 315 | self.assertRaises(GitCommandNotFound, self.git.version) | |
| 316 | 316 | ||
| 317 | 317 | def test_refresh_bad_absolute_git_path(self): | |
| 318 | + """Bad absolute path arg is reported and not set.""" | ||
| 318 | 319 | absolute_path = str(Path("yada").absolute()) | |
| 319 | 320 | expected_pattern = rf"\n[ \t]*cmdline: {re.escape(absolute_path)}\Z" | |
| 320 | 321 | ||
@@ -324,6 +325,7 @@ def test_refresh_bad_absolute_git_path(self): | |||
| 324 | 325 | self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, old_git_executable) | |
| 325 | 326 | ||
| 326 | 327 | def test_refresh_bad_relative_git_path(self): | |
| 328 | + """Bad relative path arg is resolved to absolute path and reported, not set.""" | ||
| 327 | 329 | absolute_path = str(Path("yada").absolute()) | |
| 328 | 330 | expected_pattern = rf"\n[ \t]*cmdline: {re.escape(absolute_path)}\Z" | |
| 329 | 331 | ||
@@ -333,13 +335,15 @@ def test_refresh_bad_relative_git_path(self): | |||
| 333 | 335 | self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, old_git_executable) | |
| 334 | 336 | ||
| 335 | 337 | def test_refresh_good_absolute_git_path(self): | |
| 338 | + """Good absolute path arg is set.""" | ||
| 336 | 339 | absolute_path = shutil.which("git") | |
| 337 | 340 | ||
| 338 | 341 | with _rollback_refresh(): | |
| 339 | 342 | refresh(absolute_path) | |
| 340 | 343 | self.assertEqual(self.git.GIT_PYTHON_GIT_EXECUTABLE, absolute_path) | |
| 341 | 344 | ||
| 342 | 345 | def test_refresh_good_relative_git_path(self): | |
| 346 | + """Good relative path arg is resolved to absolute path and set.""" | ||
| 343 | 347 | absolute_path = shutil.which("git") | |
| 344 | 348 | dirname, basename = osp.split(absolute_path) | |
| 345 | 349 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments