Skip to content

Commit

Permalink
Change test_root_module Windows skip to xfail
Browse files Browse the repository at this point in the history
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".)
  • Loading branch information
EliahKagan committed Sep 25, 2023
1 parent 8fd56e7 commit c1798f5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,13 @@ def test_base_bare(self, rwrepo):
reason="Cygwin GitPython can't find submodule SHA",
raises=ValueError,
)
@skipIf(
@pytest.mark.xfail(
HIDE_WINDOWS_KNOWN_ERRORS,
"""
E PermissionError:
[WinError 32] The process cannot access the file because it is being used by another process:
'C:\\Users\\ek\\AppData\\Local\\Temp\\non_bare_test_root_modulep0eqt8_r\\git\\ext\\gitdb'
-> 'C:\\Users\\ek\\AppData\\Local\\Temp\\non_bare_test_root_modulep0eqt8_r\\path\\prefix\\git\\ext\\gitdb'
""",
reason=(
'"The process cannot access the file because it is being used by another process"'
+ " on first call to rm.update"
),
raises=PermissionError,
)
@with_rw_repo(k_subm_current, bare=False)
def test_root_module(self, rwrepo):
Expand Down

0 comments on commit c1798f5

Please sign in to comment.