[Scipy-svn] r2718 - trunk/Lib/sandbox/timeseries/io/fame/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Feb 15 16:54:04 EST 2007
Author: mattknox_ca
Date: 2007-02-15 15:54:01 -0600 (Thu, 15 Feb 2007)
New Revision: 2718
Modified:
trunk/Lib/sandbox/timeseries/io/fame/tests/test_fame.py
Log:
added test for restore method
Modified: trunk/Lib/sandbox/timeseries/io/fame/tests/test_fame.py
===================================================================
--- trunk/Lib/sandbox/timeseries/io/fame/tests/test_fame.py 2007-02-15 21:31:27 UTC (rev 2717)
+++ trunk/Lib/sandbox/timeseries/io/fame/tests/test_fame.py 2007-02-15 21:54:01 UTC (rev 2718)
@@ -147,8 +147,9 @@
self._test_remove()
self._test_wildlist()
+
+ self._test_restore()
-
def _test_write_scalars(self):
"test writing all types of scalar values"
@@ -396,10 +397,12 @@
what_dict = self.db.whats('$tser_float32')
def _test_exists(self):
+ "test exists method"
assert(self.db.exists('$cser_float32'))
assert(not self.db.exists('$fake_series'))
def _test_remove(self):
+ "test remove method"
assert(self.db.exists('$cser_1'))
assert(self.db.exists('$cser_2'))
self.db.remove(['$cser_1', '$cser_2'])
@@ -410,6 +413,7 @@
def _test_wildlist(self):
+ "test wildlist method"
wl1 = self.db.wildlist("$cser_?")
wl2 = self.db.wildlist("$cser_?", wildonly=True)
@@ -418,6 +422,16 @@
assert_equal(wl1, res1)
assert_equal(wl2, res2)
+
+ def _test_restore(self):
+ "test restore method"
+ self.db.close()
+ self.db = fame.FameDb("testdb.db",'s')
+
+ self.db.remove('$tser_float32')
+ assert(not self.db.exists('$tser_float32'))
+ self.db.restore()
+ assert(self.db.exists('$tser_float32'))
def tearDown(self):
More information about the Scipy-svn
mailing list