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

Commit42a3d74

Browse files
committed
Mark TestSubmodule.test_rename xfail on Windows
The test fails when attempting to evaluate the expression: sm.move(new_path).nameas part of the assertion: assert sm.move(new_path).name == new_pathBut it is the call to sm.move that fails, not the assertion itself.The condition is never evaluated, because the subexpression raisesPermissionError. Details are in the xfail reason string.This test_submodule.TestSubmodule.test_rename method should not beconfused with test_config.TestBase.test_rename, which passes on allplatforms.On CI this has XPASS status on Python 3.7 and possibly some otherversions. This should be investigated and, if possible, the xfailmarkings should be made precise. (When working on this changebefore a rebase, I had thought only 3.7 xpassed, and that the XPASSwas only on CI, never locally. However, I am unable to reproducethat or find CI logs of it, so some of these observations may havebeen mistaken and/or or specific to a narrow environment.)
1 parentf72e282 commit42a3d74

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎test/test_submodule.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,17 @@ def test_remove_norefs(self, rwdir):
949949
sm.remove()
950950
assertnotsm.exists()
951951

952+
@pytest.mark.xfail(
953+
os.name=="nt",
954+
reason=(
955+
"The sm.move call fails. Submodule.move calls os.renames, which raises:\n"
956+
"PermissionError: [WinError 32] "
957+
"The process cannot access the file because it is being used by another process: "
958+
R"'C:\Users\ek\AppData\Local\Temp\test_renamekkbznwjp\parent\mymodules\myname' "
959+
R"-> 'C:\Users\ek\AppData\Local\Temp\test_renamekkbznwjp\parent\renamed\myname'"
960+
),
961+
raises=PermissionError,
962+
)
952963
@with_rw_directory
953964
deftest_rename(self,rwdir):
954965
parent=git.Repo.init(osp.join(rwdir,"parent"))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp