diff options
author | Dmitry Nikulin <dmitr-nikulin@mail.ru> | 2018-07-24 23:43:35 +0300 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2018-08-05 13:56:21 +0200 |
commit | e1d2f4bc85da47b5863589a47b9246af0298f016 (patch) | |
tree | cffecf0729eebdadfac57932c48f077b428b9b88 /git/test/test_git.py | |
parent | 92a481966870924604113c50645c032fa43ffb1d (diff) | |
download | gitpython-e1d2f4bc85da47b5863589a47b9246af0298f016.tar.gz |
Add test that raises TypeError in git.execute(..., output_stream=file)
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 6 |
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: |