From 54bae76a88acfc4ddb60f32938ccc8febd0c5a7d Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 20 Jun 2022 20:39:09 -0400 Subject: TST: Mark test_docs.Tutorials.test_submodules as xfail on Cygwin --- test/test_docs.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/test_docs.py b/test/test_docs.py index bea34a0b..75fd2ba5 100644 --- a/test/test_docs.py +++ b/test/test_docs.py @@ -5,6 +5,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os +import sys from test.lib import TestBase from test.lib.helper import with_rw_directory @@ -475,6 +476,11 @@ class Tutorials(TestBase): repo.git.clear_cache() + @pytest.mark.xfail( + sys.platform == "cygwin", + reason="Cygwin GitPython can't find SHA for submodule", + raises=ValueError + ) def test_submodules(self): # [1-test_submodules] repo = self.rorepo -- cgit v1.2.1 From 0eda0a54b3093681ed5431c003ec4994aecfe273 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 20 Jun 2022 20:41:36 -0400 Subject: TST: Mark test_repo.TestRepo.test_submodules as xfail on Cygwin --- test/test_repo.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test_repo.py b/test/test_repo.py index 30db1392..75b590fe 100644 --- a/test/test_repo.py +++ b/test/test_repo.py @@ -11,9 +11,12 @@ import itertools import os import pathlib import pickle +import sys import tempfile from unittest import mock, skipIf, SkipTest +import pytest + from git import ( InvalidGitRepositoryError, Repo, @@ -903,6 +906,11 @@ class TestRepo(TestBase): target_type = GitCmdObjectDB self.assertIsInstance(self.rorepo.odb, target_type) + @pytest.mark.xfail( + sys.platform == "cygwin", + reason="Cygwin GitPython can't find submodule SHA", + raises=ValueError + ) def test_submodules(self): self.assertEqual(len(self.rorepo.submodules), 1) # non-recursive self.assertGreaterEqual(len(list(self.rorepo.iter_submodules())), 2) -- cgit v1.2.1 From 7f3689d1f9ffb3ae9122a284129b61e64ac30d2d Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 20 Jun 2022 20:43:31 -0400 Subject: TST: Mark test_submodule.TestSubmodule.test_root_module as xfail on Cygwin --- test/test_submodule.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/test_submodule.py b/test/test_submodule.py index 2930ce03..98cc5543 100644 --- a/test/test_submodule.py +++ b/test/test_submodule.py @@ -3,8 +3,11 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os import shutil +import sys from unittest import skipIf +import pytest + import git from git.cmd import Git from git.compat import is_win @@ -433,6 +436,11 @@ class TestSubmodule(TestBase): def test_base_rw(self, rwrepo): self._do_base_tests(rwrepo) + @pytest.mark.xfail( + sys.platform == "cygwin", + reason="Cygwin GitPython can't find submodule SHA", + raises=ValueError + ) @with_rw_repo(k_subm_current, bare=True) def test_base_bare(self, rwrepo): self._do_base_tests(rwrepo) -- cgit v1.2.1 From c3fd6c1a7c93d28597b45ca424efa1a6fdd8b2c8 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 20 Jun 2022 20:44:20 -0400 Subject: FIX: Import pytest in tests.test_docs --- test/test_docs.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/test_docs.py b/test/test_docs.py index 75fd2ba5..20027c19 100644 --- a/test/test_docs.py +++ b/test/test_docs.py @@ -7,6 +7,8 @@ import os import sys +import pytest + from test.lib import TestBase from test.lib.helper import with_rw_directory -- cgit v1.2.1 From 2996f402f11565c3ad93aedfe070f4f5f571e72e Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 20 Jun 2022 21:02:18 -0400 Subject: FIX: Mark the correct test_submodule test as xfail on Cygwin Got the wrong one the first time. --- test/test_submodule.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_submodule.py b/test/test_submodule.py index 98cc5543..d72fe5d3 100644 --- a/test/test_submodule.py +++ b/test/test_submodule.py @@ -436,15 +436,15 @@ class TestSubmodule(TestBase): def test_base_rw(self, rwrepo): self._do_base_tests(rwrepo) + @with_rw_repo(k_subm_current, bare=True) + def test_base_bare(self, rwrepo): + self._do_base_tests(rwrepo) + @pytest.mark.xfail( sys.platform == "cygwin", reason="Cygwin GitPython can't find submodule SHA", raises=ValueError ) - @with_rw_repo(k_subm_current, bare=True) - def test_base_bare(self, rwrepo): - self._do_base_tests(rwrepo) - @skipIf( HIDE_WINDOWS_KNOWN_ERRORS, """ -- cgit v1.2.1