From 06fa9963b6c9c640aa78d61b7f998ce87257a83b Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Sun, 16 Oct 2016 21:17:46 +0200 Subject: [PATCH] cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 cases --- .appveyor.yml | 2 +- git/ext/gitdb | 2 +- git/test/test_index.py | 7 +++++++ git/test/test_repo.py | 8 ++++++++ git/test/test_submodule.py | 25 ++++++++++++------------- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0237d2e5f..701fc4ac2 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -77,7 +77,7 @@ build: false test_script: - IF "%IS_CYGWIN%" == "yes" ( - nosetests -v || echo "Ignoring failures." & EXIT /B 0 + nosetests -v ) ELSE ( IF "%PYTHON_VERSION%" == "3.5" ( nosetests -v --with-coverage diff --git a/git/ext/gitdb b/git/ext/gitdb index 38866bc7c..97035c64f 160000 --- a/git/ext/gitdb +++ b/git/ext/gitdb @@ -1 +1 @@ -Subproject commit 38866bc7c4956170c681a62c4508f934ac826469 +Subproject commit 97035c64f429c229629c25becc54ae44dd95e49d diff --git a/git/test/test_index.py b/git/test/test_index.py index 64771ef70..1abe22f48 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -49,6 +49,7 @@ from gitdb.base import IStream import os.path as osp +from git.cmd import Git class TestIndex(TestBase): @@ -405,6 +406,12 @@ def _count_existing(self, repo, files): return existing # END num existing helper + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(), + """FIXME: File "C:\projects\gitpython\git\test\test_index.py", line 642, in test_index_mutation + self.assertEqual(fd.read(), link_target) + AssertionError: '!\xff\xfe/\x00e\x00t\x00c\x00/\x00t\x00h\x00a\x00t\x00\x00\x00' + != '/etc/that' + """) @with_rw_repo('0.1.6') def test_index_mutation(self, rw_repo): index = rw_repo.index diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 95bc8a961..8b644f7ff 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -411,6 +411,14 @@ def test_blame_complex_revision(self, git): self.assertEqual(len(res), 1) self.assertEqual(len(res[0][1]), 83, "Unexpected amount of parsed blame lines") + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(), + """FIXME: File "C:\projects\gitpython\git\cmd.py", line 671, in execute + raise GitCommandError(command, status, stderr_value, stdout_value) + GitCommandError: Cmd('git') failed due to: exit code(128) + cmdline: git add 1__��ava verb��ten 1_test _myfile 1_test_other_file + 1_��ava-----verb��ten + stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files' + """) @with_rw_repo('HEAD', bare=False) def test_untracked_files(self, rwrepo): for run, (repo_add, is_invoking_git) in enumerate(( diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index eb7439bdc..d413f5aad 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -2,26 +2,18 @@ # 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 from git.compat import string_types, is_win -from git.exc import ( - InvalidGitRepositoryError, - RepositoryDirtyError -) +from git.exc import InvalidGitRepositoryError, RepositoryDirtyError from git.objects.submodule.base import Submodule from git.objects.submodule.root import RootModule, RootUpdateProgress -from git.repo.fun import ( - find_git_dir, - touch -) -from git.test.lib import ( - TestBase, - with_rw_repo -) +from git.repo.fun import find_git_dir, touch +from git.test.lib import TestBase, with_rw_repo from git.test.lib import with_rw_directory -from git.util import to_native_path_linux, join_path_native +from git.util import to_native_path_linux, join_path_native, HIDE_WINDOWS_KNOWN_ERRORS import os.path as osp @@ -667,6 +659,13 @@ def test_add_empty_repo(self, rwdir): url=empty_repo_dir, no_checkout=checkout_mode and True or False) # end for each checkout mode + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(), + """FIXME: ile "C:\projects\gitpython\git\cmd.py", line 671, in execute + raise GitCommandError(command, status, stderr_value, stdout_value) + GitCommandError: Cmd('git') failed due to: exit code(128) + cmdline: git add 1__Xava verbXXten 1_test _myfile 1_test_other_file 1_XXava-----verbXXten + stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files' + """) @with_rw_directory def test_git_submodules_and_add_sm_with_new_commit(self, rwdir): parent = git.Repo.init(osp.join(rwdir, 'parent'))