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

Commit4bf372d

Browse files
committed
test_submodule: Will now load everything into memory if smmap is present, to help the submodule test to work even on windows
1 parente00bf79 commit4bf372d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎git/test/objects/test_submodule.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,23 @@
99

1010
importshutil
1111
importgit
12+
importsys
1213
importos
1314
importsys
1415

16+
# Change the configuration if possible to prevent the underlying memory manager
17+
# to keep file handles open. On windows we get problems as they are not properly
18+
# closed due to mmap bugs on windows (as it appears)
19+
ifsys.platform=='win32':
20+
try:
21+
importsmmap.util
22+
smmap.util.MapRegion._test_read_into_memory=True
23+
exceptImportError:
24+
sys.stderr.write("The submodule tests will fail as some files cannot be removed due to open file handles.\n")
25+
sys.stderr.write("The latest version of gitdb uses a memory map manager which can be configured to work around this problem")
26+
#END handle windows platform
27+
28+
1529
classTestRootProgress(RootUpdateProgress):
1630
"""Just prints messages, for now without checking the correctness of the states"""
1731

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp