diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-03 03:22:18 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-03 04:00:11 +0200 |
commit | 6df78b19b7786b15c664a7a1e0bcbb3e7c80f8da (patch) | |
tree | a0cacbd94958abc842059907aca9b9c07836bdf7 /git/test/test_submodule.py | |
parent | 1b440827a04ad23efb891eff28d90f172723c75d (diff) | |
download | gitpython-6df78b19b7786b15c664a7a1e0bcbb3e7c80f8da.tar.gz |
Appveyor: Add and set HIDE_WINDOWS_KNOWN_ERRORS=Falsewinerr_show
+ Collect all "acknowledged" failing TCs on Appveyor and use
"HIDE_WINDOWS_KNOWN_ERRORS" var to hide them.
Diffstat (limited to 'git/test/test_submodule.py')
-rw-r--r-- | git/test/test_submodule.py | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index 6dcf1831..b0b2d4e2 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -1,28 +1,29 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -import sys import os +import sys +from unittest.case import skipIf import git - -from git.test.lib import ( - TestBase, - with_rw_repo -) -from git.test.lib import with_rw_directory +from git.compat import string_types, is_win from git.exc import ( InvalidGitRepositoryError, RepositoryDirtyError ) from git.objects.submodule.base import Submodule from git.objects.submodule.root import RootModule, RootUpdateProgress -from git.util import to_native_path_linux, join_path_native -from git.compat import string_types, is_win from git.repo.fun import ( find_git_dir, touch ) -from unittest.case import skipIf +from git.test.lib import ( + TestBase, + with_rw_repo +) +from git.test.lib import with_rw_directory +from git.test.lib.helper import HIDE_WINDOWS_KNOWN_ERRORS +from git.util import to_native_path_linux, join_path_native + # Change the configuration if possible to prevent the underlying memory manager # to keep file handles open. On windows we get problems as they are not properly @@ -417,7 +418,8 @@ class TestSubmodule(TestBase): # Error if there is no submodule file here self.failUnlessRaises(IOError, Submodule._config_parser, rwrepo, rwrepo.commit(self.k_no_subm_tag), True) - @skipIf(is_win, "FIXME: fails with: PermissionError: [WinError 32] The process cannot access the file because" + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and is_win, + "FIXME: fails with: PermissionError: [WinError 32] The process cannot access the file because" "it is being used by another process: " "'C:\\Users\\ankostis\\AppData\\Local\\Temp\\tmp95c3z83bnon_bare_test_base_rw\\git\\ext\\gitdb\\gitdb\\ext\\smmap'") # noqa E501 @with_rw_repo(k_subm_current) @@ -428,6 +430,11 @@ class TestSubmodule(TestBase): def test_base_bare(self, rwrepo): self._do_base_tests(rwrepo) + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and is_win and sys.version_info[:2] == (3, 4), """ + 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 @@ -726,6 +733,9 @@ class TestSubmodule(TestBase): assert commit_sm.binsha == sm_too.binsha assert sm_too.binsha != sm.binsha + @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and is_win, + "FIXME: helper.wrapper fails with: PermissionError: [WinError 5] Access is denied: " + "'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\test_work_tree_unsupportedryfa60di\\master_repo\\.git\\objects\\pack\\pack-bc9e0787aef9f69e1591ef38ea0a6f566ec66fe3.idx") # noqa E501 @with_rw_directory def test_git_submodule_compatibility(self, rwdir): parent = git.Repo.init(os.path.join(rwdir, 'parent')) |