From 7083924f254c87210e53733a89ca68e5ecd7441961897970175823b4228a24c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 2 Apr 2020 11:14:31 +0000 Subject: [PATCH] - Disable three more tests on git submodules: * https://github.com/gitpython-developers/GitPython/issues/597 * test-skips.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=31 --- python-GitPython.changes | 7 +++++++ python-GitPython.spec | 3 +-- test-skips.patch | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/python-GitPython.changes b/python-GitPython.changes index d84d2f8..44406ec 100644 --- a/python-GitPython.changes +++ b/python-GitPython.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 2 11:03:10 UTC 2020 - Tomáš Chvátal + +- Disable three more tests on git submodules: + * https://github.com/gitpython-developers/GitPython/issues/597 + * test-skips.patch + ------------------------------------------------------------------- Mon Mar 30 10:40:09 UTC 2020 - tchvatal@suse.com diff --git a/python-GitPython.spec b/python-GitPython.spec index 96f65a5..522240e 100644 --- a/python-GitPython.spec +++ b/python-GitPython.spec @@ -85,7 +85,6 @@ git config --global user.name "Your Name" %doc AUTHORS CHANGES README.md doc/source/*.rst %dir %{python_sitelib}/git %{python_sitelib}/git/* -%dir %{python_sitelib}/GitPython-%{version}-py*.egg-info -%{python_sitelib}/GitPython-%{version}-py*.egg-info +%{python_sitelib}/GitPython* %changelog diff --git a/test-skips.patch b/test-skips.patch index 9bfc518..452fa54 100644 --- a/test-skips.patch +++ b/test-skips.patch @@ -40,3 +40,42 @@ Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_remote.py def test_fetch_error(self): rem = self.rorepo.remote('origin') with self.assertRaisesRegex(GitCommandError, "[Cc]ouldn't find remote ref __BAD_REF__"): +Index: GitPython-3.1.0.1582544583.8c9da73/git/test/test_submodule.py +=================================================================== +--- GitPython-3.1.0.1582544583.8c9da73.orig/git/test/test_submodule.py ++++ GitPython-3.1.0.1582544583.8c9da73/git/test/test_submodule.py +@@ -420,12 +420,13 @@ class TestSubmodule(TestBase): + 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 ++ #@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) ++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error') + def test_root_module(self, rwrepo): + # Can query everything without problems + rm = RootModule(self.rorepo) +@@ -750,6 +751,7 @@ class TestSubmodule(TestBase): + # "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 ++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error') + def test_git_submodule_compatibility(self, rwdir): + parent = git.Repo.init(osp.join(rwdir, 'parent')) + sm_path = join_path_native('submodules', 'intermediate', 'one') +@@ -825,6 +827,7 @@ class TestSubmodule(TestBase): + # end for each dry-run mode + + @with_rw_directory ++ @skipIf(os.environ.get('SKIP_LOCALHOST', 'false') == 'true', 'git-daemon connection error') + def test_remove_norefs(self, rwdir): + parent = git.Repo.init(osp.join(rwdir, 'parent')) + sm_name = 'mymodules/myname'