From f70289eadb0d95f90ee2373ed80d63620d199cf4 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 20 Apr 2008 22:38:27 +0300 Subject: Clean up after tests to get rid of cache, store. --- obnam/appTests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'obnam') diff --git a/obnam/appTests.py b/obnam/appTests.py index 4e6629f0..7a52b362 100644 --- a/obnam/appTests.py +++ b/obnam/appTests.py @@ -84,6 +84,12 @@ class ApplicationLoadHostBlockTests(unittest.TestCase): context.be = obnam.backend.init(context.config, context.cache) self.app = obnam.Application(context) + def tearDown(self): + for x in ["cache", "store"]: + dirname = self.app._context.config.get("backup", x) + if os.path.isdir(dirname): + shutil.rmtree(dirname) + def testCreatesNewHostBlockWhenNoneExists(self): host = self.app.load_host() self.failUnlessEqual(host.get_id(), socket.gethostname()) -- cgit v1.2.1