Skip to content

Commit b8b039e

Browse files
committed
win, TCs: unmark hidden TC errors: 1 submodule 2 tree
+ (probably) fixes by encoding (merged from gitpython-developers#523) have fixed those 3 TCs.
1 parent ec731f4 commit b8b039e

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

git/test/test_index.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
GitCommandError,
2727
CheckoutError,
2828
)
29-
from git.compat import string_types, is_win
29+
from git.compat import string_types, is_win, PY3
3030
from git.exc import (
3131
HookExecutionError,
3232
InvalidGitRepositoryError
@@ -823,7 +823,7 @@ def test_index_bare_add(self, rw_bare_repo):
823823
asserted = True
824824
assert asserted, "Adding using a filename is not correctly asserted."
825825

826-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (2, 7), r"""
826+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and not PY3, r"""
827827
FIXME: File "C:\projects\gitpython\git\util.py", line 125, in to_native_path_linux
828828
return path.replace('\\', '/')
829829
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)""")

git/test/test_submodule.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
33
import os
44
import sys
5-
from unittest.case import skipIf
65

76
import git
87
from git.cmd import Git
@@ -22,8 +21,8 @@
2221
with_rw_repo
2322
)
2423
from git.test.lib import with_rw_directory
25-
from git.util import HIDE_WINDOWS_KNOWN_ERRORS
2624
from git.util import to_native_path_linux, join_path_native
25+
2726
import os.path as osp
2827

2928

@@ -432,11 +431,6 @@ def test_base_rw(self, rwrepo):
432431
def test_base_bare(self, rwrepo):
433432
self._do_base_tests(rwrepo)
434433

435-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """
436-
File "C:\projects\gitpython\git\cmd.py", line 559, in execute
437-
raise GitCommandNotFound(command, err)
438-
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
439-
cmdline: git clone -n --shared -v C:\projects\gitpython\.git Users\appveyor\AppData\Local\Temp\1\tmplyp6kr_rnon_bare_test_root_module""") # noqa E501
440434
@with_rw_repo(k_subm_current, bare=False)
441435
def test_root_module(self, rwrepo):
442436
# Can query everything without problems

git/test/test_tree.py

-13
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,18 @@
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

77
from io import BytesIO
8-
import sys
9-
from unittest.case import skipIf
108

119
from git import (
1210
Tree,
1311
Blob
1412
)
1513
from git.test.lib import TestBase
16-
from git.util import HIDE_WINDOWS_KNOWN_ERRORS
1714

1815
import os.path as osp
1916

2017

2118
class TestTree(TestBase):
2219

23-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """
24-
File "C:\projects\gitpython\git\cmd.py", line 559, in execute
25-
raise GitCommandNotFound(command, err)
26-
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
27-
cmdline: git cat-file --batch-check""")
2820
def test_serializable(self):
2921
# tree at the given commit contains a submodule as well
3022
roottree = self.rorepo.tree('6c1faef799095f3990e9970bc2cb10aa0221cf9c')
@@ -53,11 +45,6 @@ def test_serializable(self):
5345
testtree._deserialize(stream)
5446
# END for each item in tree
5547

56-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """
57-
File "C:\projects\gitpython\git\cmd.py", line 559, in execute
58-
raise GitCommandNotFound(command, err)
59-
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
60-
cmdline: git cat-file --batch-check""")
6148
def test_traverse(self):
6249
root = self.rorepo.tree('0.1.6')
6350
num_recursive = 0

0 commit comments

Comments
 (0)