From 0e433bc6bb9583a75eaab09af65dccef6325e0a4 Mon Sep 17 00:00:00 2001 From: Otmar Humbel Date: Wed, 12 Aug 2015 14:15:08 +0200 Subject: [PATCH] add a tearDown() method, fixes issue #35 --- tests/test_gitFunctions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_gitFunctions.py b/tests/test_gitFunctions.py index 98ae6fa..f93d14e 100644 --- a/tests/test_gitFunctions.py +++ b/tests/test_gitFunctions.py @@ -12,8 +12,13 @@ class GitFunctionsTestCase(unittest.TestCase): def setUp(self): + self.cwd = os.getcwd() self.createRepo() + def tearDown(self): + configuration.config = None + os.chdir(self.cwd) + def createRepo(self): self.repodir = tempfile.mkdtemp(prefix="gitfunctionstestcase_") configuration.config = Builder().setworkdirectory(self.repodir).setgitreponame("test.git").build()