Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf5f1dc

Browse files
committed
Report <2.5.1 in test_linked_worktree_traversal as error
Although GitPython does not require git >=2.5.1 in general, andthis does *not* change that, this makes the unavailability of git2.5.1 or later an error in test_linked_worktree_traversal, where itis needed to exercise that test, rather than skipping the test.A few systems, such as CentOS 7, may have downstream patchedversions of git that remain safe to use yet are numbered <2.5.1and do not have the necesary feature to run this test. But by now,users of those systems likely anticipate that other software wouldrely on the presence of features added in git 2.5.1, which wasreleased over 7 years ago. As such, I think it is more useful togive an error for that test, so the test's inability to be run onthe system is clear, than to automatically skip the test, which islikely to go unnoticed.
1 parent203da23 commitcf5f1dc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎test/test_fun.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
fromstatimportS_IFDIR,S_IFREG,S_IFLNK,S_IXUSR
33
fromosimportstat
44
importos.pathasosp
5-
fromunittestimportSkipTest
65

76
fromgitimportGit
87
fromgit.indeximportIndexFile
@@ -279,7 +278,7 @@ def test_linked_worktree_traversal(self, rw_dir):
279278
"""Check that we can identify a linked worktree based on a .git file"""
280279
git=Git(rw_dir)
281280
ifgit.version_info[:3]< (2,5,1):
282-
raiseSkipTest("worktree feature unsupported")
281+
raiseRuntimeError("worktree feature unsupported (test needs git 2.5.1 or later)")
283282

284283
rw_master=self.rorepo.clone(join_path_native(rw_dir,"master_repo"))
285284
branch=rw_master.create_head("aaaaaaaa")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp