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

Commita08733d

Browse files
committed
fix(test_cmd): handle GitCommandNotFound in test
Related togitpython-developers#248
1 parent1c2dd54 commita08733d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎git/test/test_git.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
fromgitimport (
2020
Git,
2121
GitCommandError,
22+
GitCommandNotFound,
2223
Repo
2324
)
2425
fromgitdb.test.libimportwith_rw_directory
@@ -127,11 +128,7 @@ def test_version(self):
127128

128129
deftest_cmd_override(self):
129130
prev_cmd=self.git.GIT_PYTHON_GIT_EXECUTABLE
130-
ifos.name=='nt':
131-
exc=GitCommandError
132-
else:
133-
exc=OSError
134-
# end handle windows case
131+
exc=GitCommandNotFound
135132
try:
136133
# set it to something that doens't exist, assure it raises
137134
type(self.git).GIT_PYTHON_GIT_EXECUTABLE=os.path.join(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp