summaryrefslogtreecommitdiff
path: root/test/testlib/helper.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-11-05 20:09:35 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-11-05 20:09:35 +0100
commit46c9a0df4403266a320059eaa66e7dce7b3d9ac4 (patch)
tree7829c074049295b869db1bdcf4f457ebefea62b7 /test/testlib/helper.py
parenta67bf61b5017e41740e997147dc88282b09c6f86 (diff)
downloadgitpython-46c9a0df4403266a320059eaa66e7dce7b3d9ac4.tar.gz
cmd: added clear_cache method now used by test repo decorators to be sure persistent commands are killed before trying to remove the directory. Unfortunately, it still claims someone has opened the file. handle.exe does not show anyone, so what is happening here ? Is it just a windows odity ? If nothing helps I could just keep the temp data, but lets do some more testing first
Diffstat (limited to 'test/testlib/helper.py')
-rw-r--r--test/testlib/helper.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/testlib/helper.py b/test/testlib/helper.py
index 27c2b3d9..5599f05e 100644
--- a/test/testlib/helper.py
+++ b/test/testlib/helper.py
@@ -82,6 +82,7 @@ def with_bare_rw_repo(func):
try:
return func(self, rw_repo)
finally:
+ rw_repo.git.clear_cache()
shutil.rmtree(repo_dir)
# END cleanup
# END bare repo creator
@@ -107,6 +108,7 @@ def with_rw_repo(working_tree_ref):
try:
return func(self, rw_repo)
finally:
+ rw_repo.git.clear_cache()
shutil.rmtree(repo_dir)
# END cleanup
# END rw repo creator
@@ -179,6 +181,8 @@ def with_rw_and_rw_remote_repo(working_tree_ref):
try:
return func(self, rw_repo, rw_remote_repo)
finally:
+ rw_repo.git.clear_cache()
+ rw_remote_repo.git.clear_cache()
shutil.rmtree(repo_dir)
shutil.rmtree(remote_repo_dir)
# END cleanup