summaryrefslogtreecommitdiff
path: root/git/test/lib/helper.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-07 20:00:06 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-07 20:00:21 +0100
commit36cdfd3209909163549850709d7f12fdf1316434 (patch)
tree4aa624df4eb2b345e594764139fa264a486e437d /git/test/lib/helper.py
parentf4a49ff2dddc66bbe25af554caba2351fbf21702 (diff)
downloadgitpython-36cdfd3209909163549850709d7f12fdf1316434.tar.gz
Made improvements to assure test-cases don't leak file handles
At least leakage is considerably reduced. Additionally, a test-case was added which triggers failure if auto-disposal of resources wouldn't work. Fixes #60
Diffstat (limited to 'git/test/lib/helper.py')
-rw-r--r--git/test/lib/helper.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py
index bd679512..6c9f33c6 100644
--- a/git/test/lib/helper.py
+++ b/git/test/lib/helper.py
@@ -279,6 +279,11 @@ class TestBase(TestCase):
"""
cls.rorepo = Repo(GIT_REPO)
+ @classmethod
+ def tearDownClass(cls):
+ cls.rorepo.git.clear_cache()
+ cls.rorepo.git = None
+
def _make_file(self, rela_path, data, repo=None):
"""
Create a file at the given path relative to our repository, filled