diff options
author | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-03-19 22:32:16 -0400 |
---|---|---|
committer | Siddharth Ravikumar <sravik@bgsu.edu> | 2015-03-19 22:32:16 -0400 |
commit | c6461d8d83d5f086aee978ab08116b0024aab939 (patch) | |
tree | 647873ed7ad62b94e693376b403587be44fb83dd /tests/events_test.py | |
parent | 8b4f318e782b385d07a5e3cf7eb1160abcc1b5a7 (diff) |
In tests, the code that purges the files/directories in `purge_list' is now a function.
modified: tests/events_test.py
modified: tests/file_test.py
modified: tests/utils.py
Diffstat (limited to 'tests/events_test.py')
-rw-r--r-- | tests/events_test.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/events_test.py b/tests/events_test.py index b63ff84..adaf86f 100644 --- a/tests/events_test.py +++ b/tests/events_test.py @@ -39,7 +39,7 @@ 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, - purge_nodedirs) + purge_nodedirs, purge) class TestEvents(object): @@ -392,12 +392,7 @@ 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) + purge(self.purge_list) @classmethod |