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

Commitf98aadd

Browse files
committed
Have test of refresh that should fail assert command
This extends test_refresh_bad_git_path so that it asserts that theexception message shows the command the failed refresh used.This test fails due to a bug where "git" is always shown (#1809).
1 parentf241808 commitf98aadd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎test/test_git.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,11 @@ def test_cmd_override(self):
307307
self.assertRaises(GitCommandNotFound,self.git.version)
308308

309309
deftest_refresh_bad_git_path(self):
310-
self.assertRaises(GitCommandNotFound,refresh,"yada")
310+
path="yada"
311+
escaped_abspath=re.escape(str(Path(path).absolute()))
312+
expected_pattern=rf"\n[ \t]*cmdline:{escaped_abspath}\Z"
313+
withself.assertRaisesRegex(GitCommandNotFound,expected_pattern):
314+
refresh(path)
311315

312316
deftest_refresh_good_git_path(self):
313317
path=shutil.which("git")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp