summaryrefslogtreecommitdiff
path: root/git/test/test_git.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-14 17:42:46 +0200
committerGitHub <noreply@github.com>2016-10-14 17:42:46 +0200
commite12ef59c559e3be8fa4a65e17c9c764da535716e (patch)
treee37739f510a328496230859cb316ce263b78e470 /git/test/test_git.py
parente3165753f9d0d69caabac74eee195887f3fea482 (diff)
parentc8e914eb0dfe6a0eb2de66b6826af5f715aeed6d (diff)
downloadgitpython-e12ef59c559e3be8fa4a65e17c9c764da535716e.tar.gz
Merge pull request #530 fixing some #525 Windows errors
+ git-daemon: + Use git-daemon PORT above 10k; on Windows all below need Admin rights. + Used relative daemon-paths with `--base-pth`. + Simplify git-daemon start/stop/ex-hanlding. +FIXED git-daemon @with_rw_and_rw_remote_repo(): + "Polish" most remote & config urls, converting \-->/. + test_base.test_with_rw_remote_and_rw_repo() PASS. + Remote: + test_remote: apply polish-urls on `_do_test_fetch()` checking function. + test_remote.test_base() now freezes on Windows! (so still hidden win_err). pump fetch-infos instead of GIL-reading stderr. + Push-cmd also keep (and optionally raise) any error messages. + `cmd.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). + util: delete unused `absolute_project_path()`. + Control separately *freezing* TCs on Windows with `git.util.HIDE_WINDOWS_FREEZE_ERRORS` flag.
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