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

Commitd6a2d28

Browse files
committed
Mark some cygpath tests xfail
Two of the groups of cygpath tests in test_util.py generate teststhat fail on Cygwin. There is no easy way to still run, but xfail,just the specific tests that fail, because the groups of tests aregenerated with `@ddt` parameterization, but neither the unittestnor pytest xfail mechanisms interact with that. If`@pytest.mark.parametrized` were used, this could be done. Butthat does not work on methods of test classes that derive fromunittest.TestCase, including those in this project that indirectlyderive from it by deriving from TestBase. The TestBase base classcannot be removed without overhauling many tests, due to fixturesit provides such as rorepo.So this marks too many tests as xfail, but in doing so allows testruns to pass while still exercising and showing status on all thetests, allowing result changes to be observed easily.
1 parent715dba4 commitd6a2d28

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎test/test_util.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
fromdatetimeimportdatetime
1414

1515
importddt
16+
importpytest
1617

1718
fromgit.cmdimportdashify
1819
fromgit.compatimportis_win
@@ -84,13 +85,21 @@ def setup(self):
8485
"array": [42],
8586
}
8687

88+
@pytest.mark.xfail(
89+
reason="Many return paths prefixed /proc/cygdrive instead.",
90+
raises=AssertionError,
91+
)
8792
@skipUnless(sys.platform=="cygwin","Paths specifically for Cygwin.")
8893
@ddt.idata(_norm_cygpath_pairs+_unc_cygpath_pairs)
8994
deftest_cygpath_ok(self,case):
9095
wpath,cpath=case
9196
cwpath=cygpath(wpath)
9297
self.assertEqual(cwpath,cpath,wpath)
9398

99+
@pytest.mark.xfail(
100+
reason=r'2nd example r".\bar" -> "bar" fails, returns "./bar"',
101+
raises=AssertionError,
102+
)
94103
@skipUnless(sys.platform=="cygwin","Paths specifically for Cygwin.")
95104
@ddt.data(
96105
(r"./bar","bar"),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp