summaryrefslogtreecommitdiff
path: root/git/test/test_index.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-09-26 20:41:41 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-09-27 12:37:16 +0200
commitf495e94028bfddc264727ffc464cd694ddd05ab8 (patch)
tree8c0bf309b08576f96c9344d9937344e1447d2237 /git/test/test_index.py
parent29eb301700c41f0af7d57d923ad069cbdf636381 (diff)
downloadgitpython-f495e94028bfddc264727ffc464cd694ddd05ab8.tar.gz
src, #519: collect all is_<platform>() calls
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r--git/test/test_index.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py
index 2ea787a4..b83201c9 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -27,7 +27,7 @@ from git import (
GitCommandError,
CheckoutError,
)
-from git.compat import string_types
+from git.compat import string_types, is_win
from gitdb.util import hex_to_bin
import os
import sys
@@ -577,7 +577,7 @@ class TestIndex(TestBase):
assert len(entries) == 1 and entries[0].hexsha != null_hex_sha
# add symlink
- if sys.platform != "win32":
+ if not is_win():
for target in ('/etc/nonexisting', '/etc/passwd', '/etc'):
basename = "my_real_symlink"
@@ -630,7 +630,7 @@ class TestIndex(TestBase):
index.checkout(fake_symlink_path)
# on windows we will never get symlinks
- if os.name == 'nt':
+ if is_win():
# simlinks should contain the link as text ( which is what a
# symlink actually is )
open(fake_symlink_path, 'rb').read() == link_target
@@ -711,7 +711,7 @@ class TestIndex(TestBase):
assert fkey not in index.entries
index.add(files, write=True)
- if os.name != 'nt':
+ if is_win():
hp = hook_path('pre-commit', index.repo.git_dir)
hpd = os.path.dirname(hp)
if not os.path.isdir(hpd):