Skip to content

Commit c1798f5

Browse files
committed
Change test_root_module Windows skip to xfail
And rewrite the reason to give more useful information. (The new reason also doesn't state the exception type, because that is now specified, and checked by pytest, by being passed as "raises".)
1 parent 8fd56e7 commit c1798f5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: test/test_submodule.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -474,14 +474,13 @@ def test_base_bare(self, rwrepo):
474474
reason="Cygwin GitPython can't find submodule SHA",
475475
raises=ValueError,
476476
)
477-
@skipIf(
477+
@pytest.mark.xfail(
478478
HIDE_WINDOWS_KNOWN_ERRORS,
479-
"""
480-
E PermissionError:
481-
[WinError 32] The process cannot access the file because it is being used by another process:
482-
'C:\\Users\\ek\\AppData\\Local\\Temp\\non_bare_test_root_modulep0eqt8_r\\git\\ext\\gitdb'
483-
-> 'C:\\Users\\ek\\AppData\\Local\\Temp\\non_bare_test_root_modulep0eqt8_r\\path\\prefix\\git\\ext\\gitdb'
484-
""",
479+
reason=(
480+
'"The process cannot access the file because it is being used by another process"'
481+
+ " on first call to rm.update"
482+
),
483+
raises=PermissionError,
485484
)
486485
@with_rw_repo(k_subm_current, bare=False)
487486
def test_root_module(self, rwrepo):

0 commit comments

Comments
 (0)