summaryrefslogtreecommitdiff
path: root/git/test/test_git.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-12 23:09:54 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-13 02:04:18 +0200
commit85f38a1bbc8fc4b19ebf2a52a3640b59a5dcf9fe (patch)
tree4f8df05b1a0c0f9168e86743888fcaf92dbfab5f /git/test/test_git.py
parent83645971b8e134f45bded528e0e0786819203252 (diff)
downloadgitpython-85f38a1bbc8fc4b19ebf2a52a3640b59a5dcf9fe.tar.gz
remote, #525: pump fetch-infos instead of GIL-read stderr
+ `handle_process_output()` accepts null-finalizer, to pump completely stderr before raising any errors. + test: Enable `TestGit.test_environment()` on Windows (to checks stderr consumption).
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r--git/test/test_git.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py
index 58ee8e9c..bd8ebee2 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -207,18 +207,15 @@ class TestGit(TestBase):
rw_repo = Repo.init(os.path.join(rw_dir, 'repo'))
remote = rw_repo.create_remote('ssh-origin', "ssh://git@server/foo")
- # This only works if we are not evaluating git-push/pull output in a thread !
- import select
- if hasattr(select, 'poll'):
- with rw_repo.git.custom_environment(GIT_SSH=path):
- try:
- remote.fetch()
- except GitCommandError as err:
- if sys.version_info[0] < 3 and is_darwin:
- self.assertIn('ssh-orig, ' in str(err))
- self.assertEqual(err.status, 128)
- else:
- self.assertIn('FOO', str(err))
+ with rw_repo.git.custom_environment(GIT_SSH=path):
+ try:
+ remote.fetch()
+ except GitCommandError as err:
+ if sys.version_info[0] < 3 and is_darwin:
+ self.assertIn('ssh-orig, ' in str(err))
+ self.assertEqual(err.status, 128)
+ else:
+ self.assertIn('FOO', str(err))
def test_handle_process_output(self):
from git.cmd import handle_process_output