summaryrefslogtreecommitdiffstats
path: root/tests/events_test.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-03-18 21:45:58 -0400
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-03-18 21:45:58 -0400
commitf1bfe57f02e37049f585211d02ed6206f62e4ee8 (patch)
treec924a2f7a5fe531ce7bd35a82ec41fa001a3b8c0 /tests/events_test.py
parentb83c93457ff73a02ba48e5422386b3c1b0534abe (diff)
tests/events_test.py: paths in `purge_list' is purged after executing each test method.
Diffstat (limited to 'tests/events_test.py')
-rw-r--r--tests/events_test.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/events_test.py b/tests/events_test.py
index 1212d69..8c4ff7e 100644
--- a/tests/events_test.py
+++ b/tests/events_test.py
@@ -333,6 +333,14 @@ class TestEvents(object):
if path.exists(silo_path):
os.remove(silo_path)
+ for f in self.purge_list:
+ if path.exists(f) and path.isfile(f):
+ os.remove(f)
+ elif path.exists(f) and path.isdir(f):
+ purge_dir(f)
+ os.rmdir(f)
+
+
@classmethod
def teardown_class(self):
"""Purge the mess created by this test"""
@@ -348,10 +356,3 @@ class TestEvents(object):
rm_nodedirs(self.config)
rm_configdir()
-
- for f in self.purge_list:
- if path.exists(f) and path.isfile(f):
- os.remove(f)
- elif path.exists(f) and path.isdir(f):
- purge_dir(f)
- os.rmdir(f)