diff --git a/test/test_submodule.py b/test/test_submodule.py index 5be1a1077..68dbcc491 100644 --- a/test/test_submodule.py +++ b/test/test_submodule.py @@ -949,6 +949,17 @@ def test_remove_norefs(self, rwdir): sm.remove() assert not sm.exists() + @pytest.mark.xfail( + os.name == "nt", + reason=( + "The sm.move call fails. Submodule.move calls os.renames, which raises:\n" + "PermissionError: [WinError 32] " + "The process cannot access the file because it is being used by another process: " + R"'C:\Users\ek\AppData\Local\Temp\test_renamekkbznwjp\parent\mymodules\myname' " + R"-> 'C:\Users\ek\AppData\Local\Temp\test_renamekkbznwjp\parent\renamed\myname'" + ), + raises=PermissionError, + ) @with_rw_directory def test_rename(self, rwdir): parent = git.Repo.init(osp.join(rwdir, "parent"))