TST: Cleaned up test references to adjustments db

If we don't clean them up, then windows can delete
the temp dir with the db.
This commit is contained in:
Richard Frank
2016-04-12 19:33:22 -04:00
parent 5254b273b2
commit 8b610a2ab7
5 changed files with 48 additions and 30 deletions
+8 -4
View File
@@ -164,6 +164,11 @@ class TestAPIShim(TestCase):
env=cls.env
)
@classmethod
def tearDownClass(cls):
del cls.adj_reader
cls.tempdir.cleanup()
@classmethod
def build_daily_data(cls):
path = cls.tempdir.getpath("testdaily.bcolz")
@@ -217,10 +222,6 @@ class TestAPIShim(TestCase):
return SQLiteAdjustmentReader(path)
@classmethod
def tearDownClass(cls):
cls.tempdir.cleanup()
def setUp(self):
self.data_portal = DataPortal(
self.env,
@@ -229,6 +230,9 @@ class TestAPIShim(TestCase):
adjustment_reader=self.adj_reader
)
def tearDown(self):
del self.data_portal
@classmethod
def create_algo(cls, code, filename=None, sim_params=None):
if sim_params is None: