summaryrefslogtreecommitdiff
path: root/git/test/test_git.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-15 13:11:16 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-16 02:46:31 +0200
commit0210e394e0776d0b7097bf666bebd690ed0c0e4f (patch)
treee74014dd49c93f75b8cf388d700b681a321d261b /git/test/test_git.py
parenta2d248bb8362808121f6b6abfd316d83b65afa79 (diff)
downloadgitpython-0210e394e0776d0b7097bf666bebd690ed0c0e4f.tar.gz
src: import os.path as osp
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r--git/test/test_git.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py
index bd8ebee2..7d713022 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:
@@ -198,13 +200,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):