summaryrefslogtreecommitdiff
path: root/git/test/lib/helper.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-09-27 16:05:58 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-09-28 03:35:38 +0200
commite61439b3018b0b9a8eb43e59d0d7cf32041e2fed (patch)
tree864b8c57283d3167b192b69bd17e366252ebee15 /git/test/lib/helper.py
parentdf2fb548040c8313f4bb98870788604bc973fa18 (diff)
downloadgitpython-e61439b3018b0b9a8eb43e59d0d7cf32041e2fed.tar.gz
src: constify is_<platform>() calls
+ TCs: unittest-asserts for git-tests.
Diffstat (limited to 'git/test/lib/helper.py')
-rw-r--r--git/test/lib/helper.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py
index 0a845a3f..7f4e81e0 100644
--- a/git/test/lib/helper.py
+++ b/git/test/lib/helper.py
@@ -74,7 +74,7 @@ def _mktemp(*args):
prefixing /private/ will lead to incorrect paths on OSX."""
tdir = tempfile.mktemp(*args)
# See :note: above to learn why this is comented out.
- # if is_darwin():
+ # if is_darwin:
# tdir = '/private' + tdir
return tdir
@@ -84,7 +84,7 @@ def _rmtree_onerror(osremove, fullpath, exec_info):
Handle the case on windows that read-only files cannot be deleted by
os.remove by setting it to mode 777, then retry deletion.
"""
- if is_win() or osremove is not os.remove:
+ if is_win or osremove is not os.remove:
raise
os.chmod(fullpath, 0o777)
@@ -141,7 +141,7 @@ def with_rw_repo(working_tree_ref, bare=False):
def launch_git_daemon(temp_dir, ip, port):
- if is_win():
+ if is_win:
## On MINGW-git, daemon exists in .\Git\mingw64\libexec\git-core\,
# but if invoked as 'git daemon', it detaches from parent `git` cmd,
# and then CANNOT DIE!
@@ -242,7 +242,7 @@ def with_rw_and_rw_remote_repo(working_tree_ref):
gd.proc.terminate()
log.warning('git(%s) ls-remote failed due to:%s',
rw_repo.git_dir, e)
- if is_win():
+ if is_win:
msg = textwrap.dedent("""
MINGW yet has problems with paths, and `git-daemon.exe` must be in PATH
(look into .\Git\mingw64\libexec\git-core\);