Skip to content

Commit

Permalink
win, TCs: unmark hidden TC errors: 1 submodule 2 tree
Browse files Browse the repository at this point in the history
+ (probably) fixes by encoding (merged from gitpython-developers#523) have fixed those 3
TCs.
  • Loading branch information
ankostis committed Oct 16, 2016
1 parent ec731f4 commit b8b039e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
4 changes: 2 additions & 2 deletions git/test/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)""")
Expand Down
8 changes: 1 addition & 7 deletions git/test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions git/test/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b8b039e

Please sign in to comment.