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

Commitec00872

Browse files
committed
add tests for is_cygwin_git
1 parentaa6b7e9 commitec00872

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎test/test_util.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
LockFile,
3535
cygpath,
3636
decygpath,
37+
is_cygwin_git,
3738
get_user_id,
3839
remove_password_if_present,
3940
rmtree,
@@ -349,6 +350,24 @@ def test_decygpath(self, wpath, cpath):
349350
assertwcpath==wpath.replace("/","\\"),cpath
350351

351352

353+
classTestIsCygwinGit:
354+
"""Tests for :func:`is_cygwin_git`"""
355+
356+
deftest_on_path_executable(self):
357+
matchsys.platform:
358+
case"cygwin":
359+
assertis_cygwin_git("git")
360+
case _:
361+
assertnotis_cygwin_git("git")
362+
363+
deftest_none_executable(self):
364+
assertnotis_cygwin_git(None)
365+
366+
deftest_with_missing_uname(self):
367+
"""Test for handling when `uname` isn't in the same directory as `git`"""
368+
assertnotis_cygwin_git("/bogus_path/git")
369+
370+
352371
class_Member:
353372
"""A member of an IterableList."""
354373

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp