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

Commit715dba4

Browse files
committed
Run cygpath tests on Cygwin, not native Windows
They were not running on Cygwin, because git.util.is_win is Falseon Cygwin. They were running on native Windows, with a number ofthem always failing; these failures had sometimes been obscured bythe --maxfail=10 that had formerly been used (from pyproject.toml).Many of them (not all the same ones) fail on Cygwin, and it mightbe valuable for cygpath to work on other platforms, especiallynative Windows. But I think it still makes sense to limit the teststo Cygwin at this time, because all the uses of cygpath in theproject are in code that only runs after a check that the platformis Cygwin. Part of that check, as it is implemented, explicitlyexcludes native Windows (is_win must be false).
1 parent0eb38bc commit715dba4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎test/test_util.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
importsys
1010
importtempfile
1111
importtime
12-
fromunittestimportmock,skipIf
12+
fromunittestimportmock,skipUnless
1313
fromdatetimeimportdatetime
1414

1515
importddt
@@ -84,14 +84,14 @@ def setup(self):
8484
"array": [42],
8585
}
8686

87-
@skipIf(notis_win,"Paths specifically forWindows.")
87+
@skipUnless(sys.platform=="cygwin","Paths specifically forCygwin.")
8888
@ddt.idata(_norm_cygpath_pairs+_unc_cygpath_pairs)
8989
deftest_cygpath_ok(self,case):
9090
wpath,cpath=case
9191
cwpath=cygpath(wpath)
9292
self.assertEqual(cwpath,cpath,wpath)
9393

94-
@skipIf(notis_win,"Paths specifically forWindows.")
94+
@skipUnless(sys.platform=="cygwin","Paths specifically forCygwin.")
9595
@ddt.data(
9696
(r"./bar","bar"),
9797
(r".\bar","bar"),
@@ -104,7 +104,7 @@ def test_cygpath_norm_ok(self, case):
104104
cwpath=cygpath(wpath)
105105
self.assertEqual(cwpath,cpathorwpath,wpath)
106106

107-
@skipIf(notis_win,"Paths specifically forWindows.")
107+
@skipUnless(sys.platform=="cygwin","Paths specifically forCygwin.")
108108
@ddt.data(
109109
r"C:",
110110
r"C:Relative",
@@ -117,7 +117,7 @@ def test_cygpath_invalids(self, wpath):
117117
cwpath=cygpath(wpath)
118118
self.assertEqual(cwpath,wpath.replace("\\","/"),wpath)
119119

120-
@skipIf(notis_win,"Paths specifically forWindows.")
120+
@skipUnless(sys.platform=="cygwin","Paths specifically forCygwin.")
121121
@ddt.idata(_norm_cygpath_pairs)
122122
deftest_decygpath(self,case):
123123
wpath,cpath=case

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp