diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_docs.py | 8 | ||||
-rw-r--r-- | test/test_repo.py | 8 | ||||
-rw-r--r-- | test/test_submodule.py | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/test_docs.py b/test/test_docs.py index bea34a0b..20027c19 100644 --- a/test/test_docs.py +++ b/test/test_docs.py @@ -5,6 +5,9 @@ # 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 + +import pytest from test.lib import TestBase from test.lib.helper import with_rw_directory @@ -475,6 +478,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 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) diff --git a/test/test_submodule.py b/test/test_submodule.py index 2930ce03..d72fe5d3 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 @@ -437,6 +440,11 @@ class TestSubmodule(TestBase): 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 + ) @skipIf( HIDE_WINDOWS_KNOWN_ERRORS, """ |