Skip to content

Commit 8704d1b

Browse files
committed
Change test_git_submodules_and_add_sm_with_new_commit Windows skip to xfail
And improve details. The xfail is only for native Windows, not Cygwin (same as the old skip was, and still via checking HIDE_WINDOWS_KNOWN_ERRORS). This change is analogous to the change in c1798f5, but for test_git_submodules_and_add_sm_with_new_commit rather than test_root_module.
1 parent ba56752 commit 8704d1b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Diff for: test/test_submodule.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import tempfile
88
from pathlib import Path
99
import sys
10-
from unittest import mock, skipIf, skipUnless
10+
from unittest import mock, skipUnless
1111

1212
import pytest
1313

@@ -748,14 +748,13 @@ def test_list_only_valid_submodules(self, rwdir):
748748
repo = git.Repo(repo_path)
749749
assert len(repo.submodules) == 0
750750

751-
@skipIf(
751+
@pytest.mark.xfail(
752752
HIDE_WINDOWS_KNOWN_ERRORS,
753-
"""
754-
E PermissionError:
755-
[WinError 32] The process cannot access the file because it is being used by another process:
756-
'C:\\Users\\ek\\AppData\\Local\\Temp\\test_git_submodules_and_add_sm_with_new_commitu6d08von\\parent\\module'
757-
-> 'C:\\Users\\ek\\AppData\\Local\\Temp\\test_git_submodules_and_add_sm_with_new_commitu6d08von\\parent\\module_moved'
758-
""" # noqa: E501,
753+
reason=(
754+
'"The process cannot access the file because it is being used by another process"'
755+
+ " on first call to sm.move"
756+
),
757+
raises=PermissionError,
759758
)
760759
@with_rw_directory
761760
@_patch_git_config("protocol.file.allow", "always")

0 commit comments

Comments
 (0)