From 36cdfd3209909163549850709d7f12fdf1316434 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 7 Jan 2015 20:00:06 +0100 Subject: 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 --- git/test/lib/helper.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'git/test/lib/helper.py') 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 -- cgit v1.2.1