diff --git a/git/test/test_index.py b/git/test/test_index.py index 99b35db7c..64771ef70 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -26,7 +26,7 @@ GitCommandError, CheckoutError, ) -from git.compat import string_types, is_win +from git.compat import string_types, is_win, PY3 from git.exc import ( HookExecutionError, InvalidGitRepositoryError @@ -823,7 +823,7 @@ def test_index_bare_add(self, rw_bare_repo): asserted = True assert asserted, "Adding using a filename is not correctly asserted." - @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (2, 7), r""" + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and not PY3, r""" FIXME: File "C:\projects\gitpython\git\util.py", line 125, in to_native_path_linux return path.replace('\\', '/') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)""") diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index bbf242c0f..eb7439bdc 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -2,7 +2,6 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os import sys -from unittest.case import skipIf import git from git.cmd import Git @@ -22,8 +21,8 @@ with_rw_repo ) from git.test.lib import with_rw_directory -from git.util import HIDE_WINDOWS_KNOWN_ERRORS from git.util import to_native_path_linux, join_path_native + import os.path as osp @@ -432,11 +431,6 @@ def test_base_rw(self, rwrepo): def test_base_bare(self, rwrepo): self._do_base_tests(rwrepo) - @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ - File "C:\projects\gitpython\git\cmd.py", line 559, in execute - raise GitCommandNotFound(command, err) - git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') - cmdline: git clone -n --shared -v C:\projects\gitpython\.git Users\appveyor\AppData\Local\Temp\1\tmplyp6kr_rnon_bare_test_root_module""") # noqa E501 @with_rw_repo(k_subm_current, bare=False) def test_root_module(self, rwrepo): # Can query everything without problems diff --git a/git/test/test_tree.py b/git/test/test_tree.py index f92598743..6b685c976 100644 --- a/git/test/test_tree.py +++ b/git/test/test_tree.py @@ -5,26 +5,18 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php from io import BytesIO -import sys -from unittest.case import skipIf from git import ( Tree, Blob ) from git.test.lib import TestBase -from git.util import HIDE_WINDOWS_KNOWN_ERRORS import os.path as osp class TestTree(TestBase): - @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ - File "C:\projects\gitpython\git\cmd.py", line 559, in execute - raise GitCommandNotFound(command, err) - git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') - cmdline: git cat-file --batch-check""") def test_serializable(self): # tree at the given commit contains a submodule as well roottree = self.rorepo.tree('6c1faef799095f3990e9970bc2cb10aa0221cf9c') @@ -53,11 +45,6 @@ def test_serializable(self): testtree._deserialize(stream) # END for each item in tree - @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ - File "C:\projects\gitpython\git\cmd.py", line 559, in execute - raise GitCommandNotFound(command, err) - git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') - cmdline: git cat-file --batch-check""") def test_traverse(self): root = self.rorepo.tree('0.1.6') num_recursive = 0