summaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-02-19 21:51:55 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-02-19 21:51:55 -0500
commit643b62343cc3205e1caa9151748c07d75a1d0467 (patch)
treea2f1d902a7b2e8861e558dd327db96681e4f3f85 /tests/utils.py
parent9820b99266802a0bbd7236950aa1c143d5287a7b (diff)
tests/utils.py: modded `rm_nodedirs' and defined new function 'purge_nodedirs'
- rm_nodedirs now calls purge_nodedirs and then deletes the node directories. - purge_nodedirs function just purges the contents of the node directories.
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 8794459..1e03e66 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -58,16 +58,24 @@ def get_config():
def rm_nodedirs(config):
- """Removes node directories"""
+ """Purges and removes node directories."""
nodes = get_nodedirs(config)
+ purge_nodedirs(config)
+
for node in nodes:
try:
- purge_dir(node)
rmdir(node)
except OSError, e:
print "Problem deleting", node, e
+def purge_nodedirs(config):
+ """Purges everything inside node directories."""
+ nodes = get_nodedirs(config)
+ for node in nodes:
+ purge_dir(node)
+
+
def rm_configdir():
"""Removes the combox test config directory."""
config_dir = path.join('tests', 'test-config')