diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-10-22 11:11:25 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-10-22 11:11:25 +0200 |
commit | caa0ea7a0893fe90ea043843d4e6ad407126d7b8 (patch) | |
tree | 2f688eb182f2e76091134c47c4a327681c12e15b /git/test/test_git.py | |
parent | afcd64ebbb770908bd2a751279ff070dea5bb97c (diff) | |
parent | cc77e6b2862733a211c55cf29cc7a83c36c27919 (diff) | |
download | gitpython-caa0ea7a0893fe90ea043843d4e6ad407126d7b8.tar.gz |
Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ankostis-cygwin
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r-- | git/test/test_git.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 14c70e18..f97f8130 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -5,9 +5,17 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -import sys import subprocess +import sys +from git import ( + Git, + GitCommandError, + GitCommandNotFound, + Repo, + cmd +) +from git.compat import PY3, is_darwin from git.test.lib import ( TestBase, patch, @@ -17,18 +25,12 @@ from git.test.lib import ( assert_match, fixture_path ) -from git import ( - Git, - GitCommandError, - GitCommandNotFound, - Repo, - cmd -) from git.test.lib import with_rw_directory - -from git.compat import PY3, is_darwin from git.util import finalize_process +import os.path as osp + + try: from unittest import mock except ImportError: @@ -147,7 +149,7 @@ class TestGit(TestBase): exc = GitCommandNotFound try: # set it to something that doens't exist, assure it raises - type(self.git).GIT_PYTHON_GIT_EXECUTABLE = os.path.join( + type(self.git).GIT_PYTHON_GIT_EXECUTABLE = osp.join( "some", "path", "which", "doesn't", "exist", "gitbinary") self.failUnlessRaises(exc, self.git.version) finally: @@ -212,13 +214,13 @@ class TestGit(TestBase): self.assertEqual(new_env, {'VARKEY': 'VARVALUE'}) self.assertEqual(self.git.environment(), {}) - path = os.path.join(rw_dir, 'failing-script.sh') + path = osp.join(rw_dir, 'failing-script.sh') with open(path, 'wt') as stream: stream.write("#!/usr/bin/env sh\n" "echo FOO\n") os.chmod(path, 0o777) - rw_repo = Repo.init(os.path.join(rw_dir, 'repo')) + rw_repo = Repo.init(osp.join(rw_dir, 'repo')) remote = rw_repo.create_remote('ssh-origin', "ssh://git@server/foo") with rw_repo.git.custom_environment(GIT_SSH=path): |