Skip to content

Commit 0eda0a5

Browse files
authored
TST: Mark test_repo.TestRepo.test_submodules as xfail on Cygwin
1 parent 54bae76 commit 0eda0a5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎test/test_repo.py

+8
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
import os
1212
import pathlib
1313
import pickle
14+
import sys
1415
import tempfile
1516
from unittest import mock, skipIf, SkipTest
1617

18+
import pytest
19+
1720
from git import (
1821
InvalidGitRepositoryError,
1922
Repo,
@@ -903,6 +906,11 @@ def test_repo_odbtype(self):
903906
target_type = GitCmdObjectDB
904907
self.assertIsInstance(self.rorepo.odb, target_type)
905908

909+
@pytest.mark.xfail(
910+
sys.platform == "cygwin",
911+
reason="Cygwin GitPython can't find submodule SHA",
912+
raises=ValueError
913+
)
906914
def test_submodules(self):
907915
self.assertEqual(len(self.rorepo.submodules), 1) # non-recursive
908916
self.assertGreaterEqual(len(list(self.rorepo.iter_submodules())), 2)

0 commit comments

Comments
 (0)