summaryrefslogtreecommitdiff
path: root/git/test
diff options
context:
space:
mode:
authorDmitry Nikulin <dmitr-nikulin@mail.ru>2018-07-24 23:43:35 +0300
committerSebastian Thiel <byronimo@gmail.com>2018-08-05 13:56:21 +0200
commite1d2f4bc85da47b5863589a47b9246af0298f016 (patch)
treecffecf0729eebdadfac57932c48f077b428b9b88 /git/test
parent92a481966870924604113c50645c032fa43ffb1d (diff)
downloadgitpython-e1d2f4bc85da47b5863589a47b9246af0298f016.tar.gz
Add test that raises TypeError in git.execute(..., output_stream=file)
Diffstat (limited to 'git/test')
-rw-r--r--git/test/test_git.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py
index c6180f7c..cc931239 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -7,6 +7,7 @@
import os
import subprocess
import sys
+from tempfile import TemporaryFile
from git import (
Git,
@@ -108,6 +109,11 @@ class TestGit(TestBase):
self.git.version(pass_this_kwarg=False)
assert_true("pass_this_kwarg" not in git.call_args[1])
+ @raises(GitCommandError)
+ def test_it_raises_proper_exception_with_output_stream(self):
+ tmp_file = TemporaryFile()
+ self.git.checkout('non-existent-branch', output_stream=tmp_file)
+
def test_it_accepts_environment_variables(self):
filename = fixture_path("ls_tree_empty")
with open(filename, 'r') as fh: