[Zope3-checkins] CVS: ZODB/src/ZODB/tests - testRecover.py:1.9

Tim Peters tim.one at comcast.net
Mon May 3 14:55:41 EDT 2004


Update of /cvs-repository/ZODB/src/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv13421/src/ZODB/tests

Modified Files:
	testRecover.py 
Log Message:
testNoDamage:  ensure that 0 bytes were removed by recovery, not just
that the number of bytes removed ends with "0".

Other tests:  if the output doesn't contain 'error', show the actual
output.


=== ZODB/src/ZODB/tests/testRecover.py 1.8 => 1.9 ===
--- ZODB/src/ZODB/tests/testRecover.py:1.8	Mon May  3 14:44:32 2004
+++ ZODB/src/ZODB/tests/testRecover.py	Mon May  3 14:55:40 2004
@@ -101,13 +101,13 @@
     def testNoDamage(self):
         output = self.recover()
         self.assert_('error' not in output, output)
-        self.assert_('0 bytes removed during recovery' in output, output)
+        self.assert_('\n0 bytes removed during recovery' in output, output)
 
     def testOneBlock(self):
         for i in range(self.ITERATIONS):
             self.damage(1, 1024)
             output = self.recover()
-            self.assert_('error' in output)
+            self.assert_('error' in output, output)
             self.recovered = FileStorage(self.dest)
             self.recovered.close()
             os.remove(self.path)
@@ -117,7 +117,7 @@
         for i in range(self.ITERATIONS):
             self.damage(4, 512)
             output = self.recover()
-            self.assert_('error' in output)
+            self.assert_('error' in output, output)
             self.recovered = FileStorage(self.dest)
             self.recovered.close()
             os.remove(self.path)
@@ -127,7 +127,7 @@
         for i in range(self.ITERATIONS):
             self.damage(1, 32 * 1024)
             output = self.recover()
-            self.assert_('error' in output)
+            self.assert_('error' in output, output)
             self.recovered = FileStorage(self.dest)
             self.recovered.close()
             os.remove(self.path)
@@ -153,7 +153,7 @@
         f.write("\0" * 100)
         f.close()
         output = self.recover()
-        self.assert_('error' in output)
+        self.assert_('error' in output, output)
         self.recovered = FileStorage(self.dest)
         self.recovered.close()
         os.remove(self.path)
@@ -165,7 +165,7 @@
         f.write("\0" * 100)
         f.close()
         output = self.recover()
-        self.assert_('error' in output)
+        self.assert_('error' in output, output)
         self.recovered = FileStorage(self.dest)
         self.recovered.close()
 




More information about the Zope3-Checkins mailing list