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

Commit0b7ee17

Browse files
committed
Refine TestSubmodule.test_rename xfail condition
This further improves the condition that was corrected in82c361e.Testing on Python 3.13.0 alpha 2 shows the same failure as on 3.12(that I'm at least right now consistently unable to produce on anylower versions).In addition, on both versions of CPython on Windows, the failureseems to consistently resolve if two gc.collect() are placed justabove the code that calls sm.move(). A single call is consistentlyinsufficient. I haven't included any such calls in this commit,since the focus here is on fixing xfail markings, and becuse such achange may benefit from being evaluated separately and may meritfurther accompanying changes. But that this behavior is exhibitedon both 3.12 and the 3.13 alpha further supports removing theupper bound on the xfail marking.
1 parent0ae5dd1 commit0b7ee17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎test/test_submodule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,14 +950,14 @@ def test_remove_norefs(self, rwdir):
950950
assertnotsm.exists()
951951

952952
@pytest.mark.xfail(
953-
os.name=="nt"and(3,12)<=sys.version_info< (3,13),
953+
os.name=="nt"andsys.version_info>= (3,12),
954954
reason=(
955955
"The sm.move call fails. Submodule.move calls os.renames, which raises:\n"
956956
"PermissionError: [WinError 32] "
957957
"The process cannot access the file because it is being used by another process: "
958958
R"'C:\Users\ek\AppData\Local\Temp\test_renamekkbznwjp\parent\mymodules\myname' "
959959
R"-> 'C:\Users\ek\AppData\Local\Temp\test_renamekkbznwjp\parent\renamed\myname'"
960-
"\nThis resembles other Windows errors, butseemsonlyto affectPython 3.12 somehow."
960+
"\nThis resembles other Windows errors, but onlyoccurs starting inPython 3.12."
961961
),
962962
raises=PermissionError,
963963
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp