Skip to content

Commit 4198593

Browse files
committed
cygwin, appveyor, gitpython-developers#533: Enable actual failures, hide certain 2+2 cases
1 parent b8b039e commit 4198593

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

Diff for: .appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build: false
7777

7878
test_script:
7979
- IF "%IS_CYGWIN%" == "yes" (
80-
nosetests -v || echo "Ignoring failures." & EXIT /B 0
80+
nosetests -v
8181
) ELSE (
8282
IF "%PYTHON_VERSION%" == "3.5" (
8383
nosetests -v --with-coverage

Diff for: git/test/test_index.py

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
from gitdb.base import IStream
5050

5151
import os.path as osp
52+
from git.cmd import Git
5253

5354

5455
class TestIndex(TestBase):
@@ -405,6 +406,12 @@ def _count_existing(self, repo, files):
405406
return existing
406407
# END num existing helper
407408

409+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
410+
"""FIXME: File "C:\projects\gitpython\git\test\test_index.py", line 642, in test_index_mutation
411+
self.assertEqual(fd.read(), link_target)
412+
AssertionError: '!<symlink>\xff\xfe/\x00e\x00t\x00c\x00/\x00t\x00h\x00a\x00t\x00\x00\x00'
413+
!= '/etc/that'
414+
""")
408415
@with_rw_repo('0.1.6')
409416
def test_index_mutation(self, rw_repo):
410417
index = rw_repo.index

Diff for: git/test/test_repo.py

+8
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,14 @@ def test_blame_complex_revision(self, git):
411411
self.assertEqual(len(res), 1)
412412
self.assertEqual(len(res[0][1]), 83, "Unexpected amount of parsed blame lines")
413413

414+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
415+
"""FIXME: File "C:\projects\gitpython\git\cmd.py", line 671, in execute
416+
raise GitCommandError(command, status, stderr_value, stdout_value)
417+
GitCommandError: Cmd('git') failed due to: exit code(128)
418+
cmdline: git add 1__��ava verb��ten 1_test _myfile 1_test_other_file
419+
1_��ava-----verb��ten
420+
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
421+
""")
414422
@with_rw_repo('HEAD', bare=False)
415423
def test_untracked_files(self, rwrepo):
416424
for run, (repo_add, is_invoking_git) in enumerate((

Diff for: git/test/test_submodule.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
1+
# -*- coding: utf-8 -*-
12
# This module is part of GitPython and is released under
23
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
34
import os
45
import sys
6+
from unittest.case import skipIf
57

68
import git
79
from git.cmd import Git
810
from git.compat import string_types, is_win
9-
from git.exc import (
10-
InvalidGitRepositoryError,
11-
RepositoryDirtyError
12-
)
11+
from git.exc import InvalidGitRepositoryError, RepositoryDirtyError
1312
from git.objects.submodule.base import Submodule
1413
from git.objects.submodule.root import RootModule, RootUpdateProgress
15-
from git.repo.fun import (
16-
find_git_dir,
17-
touch
18-
)
19-
from git.test.lib import (
20-
TestBase,
21-
with_rw_repo
22-
)
14+
from git.repo.fun import find_git_dir, touch
15+
from git.test.lib import TestBase, with_rw_repo
2316
from git.test.lib import with_rw_directory
24-
from git.util import to_native_path_linux, join_path_native
17+
from git.util import to_native_path_linux, join_path_native, HIDE_WINDOWS_KNOWN_ERRORS
2518

2619
import os.path as osp
2720

@@ -667,6 +660,13 @@ def test_add_empty_repo(self, rwdir):
667660
url=empty_repo_dir, no_checkout=checkout_mode and True or False)
668661
# end for each checkout mode
669662

663+
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
664+
"""FIXME: ile "C:\projects\gitpython\git\cmd.py", line 671, in execute
665+
raise GitCommandError(command, status, stderr_value, stdout_value)
666+
GitCommandError: Cmd('git') failed due to: exit code(128)
667+
cmdline: git add 1__Xava verbXXten 1_test _myfile 1_test_other_file 1_XXava-----verbXXten
668+
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
669+
""")
670670
@with_rw_directory
671671
def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
672672
parent = git.Repo.init(osp.join(rwdir, 'parent'))

0 commit comments

Comments
 (0)