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

Commite1d2f4b

Browse files
Dmitry NikulinByron
Dmitry Nikulin
authored andcommitted
Add test that raises TypeError in git.execute(..., output_stream=file)
1 parent92a4819 commite1d2f4b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎git/test/test_git.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
importos
88
importsubprocess
99
importsys
10+
fromtempfileimportTemporaryFile
1011

1112
fromgitimport (
1213
Git,
@@ -108,6 +109,11 @@ def test_it_ignores_false_kwargs(self, git):
108109
self.git.version(pass_this_kwarg=False)
109110
assert_true("pass_this_kwarg"notingit.call_args[1])
110111

112+
@raises(GitCommandError)
113+
deftest_it_raises_proper_exception_with_output_stream(self):
114+
tmp_file=TemporaryFile()
115+
self.git.checkout('non-existent-branch',output_stream=tmp_file)
116+
111117
deftest_it_accepts_environment_variables(self):
112118
filename=fixture_path("ls_tree_empty")
113119
withopen(filename,'r')asfh:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp