diff options
Diffstat (limited to 'gitdb/test/lib.py')
| -rw-r--r-- | gitdb/test/lib.py | 9 |
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 |
