From bd52ab66c8b60bb7882a8dd0fb513e2f7519d8e4 Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Thu, 19 Feb 2015 21:56:10 -0500 Subject: tests/events_test.py: defined teardown method in TestEvents class. - The teardown method is invoked after the end of each test in the TestEvents class. - At the moment the teardown method just purges the node directories. --- tests/events_test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/events_test.py b/tests/events_test.py index 5e5b13f..110dfb4 100644 --- a/tests/events_test.py +++ b/tests/events_test.py @@ -37,7 +37,8 @@ from combox.file import (relative_path, purge_dir, from combox.silo import ComboxSilo from tests.utils import (get_config, shardedp, dirp, renamedp, - path_deletedp, rm_nodedirs, rm_configdir) + path_deletedp, rm_nodedirs, rm_configdir, + purge_nodedirs) class TestEvents(object): @@ -221,6 +222,11 @@ class TestEvents(object): assert not silo.stale(self.lorem_ipsum) + def teardown(self): + """Cleans up things after each test in this class""" + purge_nodedirs(self.config) + + @classmethod def teardown_class(self): """Purge the mess created by this test""" -- cgit v1.2.3