summaryrefslogtreecommitdiff
path: root/gitdb/test/lib.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-24 17:32:06 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-24 18:26:06 +0200
commit534c9bbe320f638153f9ffd79b79fa124b544d0f (patch)
tree731c56781e2b0bf367919ed8a0ef7e0a61f6a200 /gitdb/test/lib.py
parent08b1f5f4fdc95d4ce24aa33ec82ac0d9723b8a02 (diff)
downloadgitdb-2.1.0.dev1.tar.gz
fix(win): FIX and HIDE 2 win-errors remainingv2.1.0.dev1
+ File-in-use errors were fixed with `gitdb.util.mman.collect()`! + This call is disabled `gitdb.util.HIDE_WINDOWS_KNOWN_ERRORS == False`. + Depend on latest smmp `v2.1.0.dev1` tag
Diffstat (limited to 'gitdb/test/lib.py')
-rw-r--r--gitdb/test/lib.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gitdb/test/lib.py b/gitdb/test/lib.py
index 8b5cb02..0017031 100644
--- a/gitdb/test/lib.py
+++ b/gitdb/test/lib.py
@@ -17,7 +17,7 @@ import tempfile
import unittest
from gitdb import OStream
-from gitdb.util import rmtree
+from gitdb.util import rmtree, mman, HIDE_WINDOWS_KNOWN_ERRORS
from gitdb.utils.compat import xrange
@@ -96,6 +96,13 @@ def with_rw_directory(func):
# memory maps closed, once objects go out of scope. For some reason
# though this is not the case here unless we collect explicitly.
if not keep:
+ if HIDE_WINDOWS_KNOWN_ERRORS:
+ ## Or else 2 Windows TCs fail with:
+ # File "D:\Work\gitdb.git\gitdb\util.py", line 141, in onerror
+ # func(path) # Will scream if still not possible to delete.
+ # PermissionError: [WinError 32] The process cannot access the file
+ # because it is being used by another process: 'sss\\index_cc_wll5'
+ mman.collect()
gc.collect()
rmtree(path)
# END handle exception