[Zodb-checkins] CVS: Zope3/lib/python/Persistence/BTrees/tests - testBTreesUnicode.py:1.1.2.2

Jeremy Hylton jeremy@zope.com
Mon, 25 Feb 2002 14:26:50 -0500


Update of /cvs-repository/Zope3/lib/python/Persistence/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv348

Modified Files:
      Tag: Zope-3x-branch
	testBTreesUnicode.py 
Log Message:
Fiddle BTrees test suite.

BTreesUnicode:
    Use assertEqual() instead of assert.
    Use assert for error checking instead of print.



=== Zope3/lib/python/Persistence/BTrees/tests/testBTreesUnicode.py 1.1.2.1 => 1.1.2.2 ===
                 self.tree[k] = v
 
-
-
     def test1(self):
         """ check every item of the tree """
 
@@ -60,16 +58,14 @@
             else:
                 key = k
 
-            if self.tree[key] != v:
-                print "fehler"
-
+            self.assertEqual(self.tree[key], v)
 
     def test2(self):
         """ try to access unicode keys in tree"""
 
-        assert self.data[-1][0] == self.s
-        assert self.tree[self.data[-1][0]] == self.data[-1][1]
-        assert self.tree[self.s] == self.data[-1][1],''
+        self.assertEqual(self.data[-1][0], self.s)
+        self.assertEqual(self.tree[self.data[-1][0]], self.data[-1][1])
+        self.assertEqual(self.tree[self.s], self.data[-1][1])
 
 
 def test_suite():