From 643b62343cc3205e1caa9151748c07d75a1d0467 Mon Sep 17 00:00:00 2001 From: Siddharth Ravikumar Date: Thu, 19 Feb 2015 21:51:55 -0500 Subject: 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. --- tests/utils.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests') 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') -- cgit v1.2.3