[tracker/sam/functional-test-fixes: 18/28] further cleanups of minertest



commit 196686a971ade7d7cafee4a80ad875e9dfb1a511
Author: Sam Thursfield <sam afuera me uk>
Date:   Sat Aug 2 00:54:01 2014 +0100

    further cleanups of minertest

 tests/functional-tests/common/utils/minertest.py |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/tests/functional-tests/common/utils/minertest.py 
b/tests/functional-tests/common/utils/minertest.py
index e902050..113eca9 100644
--- a/tests/functional-tests/common/utils/minertest.py
+++ b/tests/functional-tests/common/utils/minertest.py
@@ -82,14 +82,6 @@ class CommonTrackerMinerTest (ut.TestCase):
             if not os.path.exists(dirname):
                 os.makedirs(dirname)
 
-        for d in ['test-monitored', 'test-no-monitored']:
-            dirname = path(d)
-            if os.path.exists (dirname):
-                warnings.warn(
-                    "Test-data directory %s already exists. I'm removing it!" %
-                    dirname)
-                shutil.rmtree(dirname)
-
         for tf in chain(monitored_files, unmonitored_files):
             testfile = path(tf)
             ensure_dir_exists(os.path.dirname(testfile))
@@ -102,6 +94,12 @@ class CommonTrackerMinerTest (ut.TestCase):
 
     @classmethod 
     def setUpClass (self):
+        for d in ['test-monitored', 'test-no-monitored']:
+            dirname = path(d)
+            if os.path.exists (dirname):
+                shutil.rmtree(dirname)
+            os.makedirs(dirname)
+
         self.system = TrackerSystemAbstraction ()
 
         self.system.tracker_miner_fs_testing_start (CONF_OPTIONS)
@@ -112,4 +110,3 @@ class CommonTrackerMinerTest (ut.TestCase):
     @classmethod
     def tearDownClass (self):
         self.system.tracker_miner_fs_testing_stop ()
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]