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

Commit48fab54

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 parent4a8bdce commit48fab54

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

‎git/ext/gitdb

Submodule gitdb updated1 file

‎git/test/test_submodule.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,22 @@
88
fromgit.utilimportto_native_path_linux,join_path_native
99
importshutil
1010
importgit
11+
importsys
1112
importos
1213

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp