[ZPT] CVS: Zope/lib/python/ZTUtils/tests - testBatch.py:1.4.52.1

Casey Duncan casey@zope.com
Wed, 27 Mar 2002 15:52:04 -0500


Update of /cvs-repository/Zope/lib/python/ZTUtils/tests
In directory cvs.zope.org:/tmp/cvs-serv22094/lib/python/ZTUtils/tests

Modified Files:
      Tag: casey-death_to_index_html-branch
	testBatch.py 
Log Message:
Updating branch to head for testing


=== Zope/lib/python/ZTUtils/tests/testBatch.py 1.4 => 1.4.52.1 ===
+import os, sys
+
+from unittest import TestCase, makeSuite, main
 
 import string
 from ZTUtils import Batch
 
-class BatchTests(unittest.TestCase):
+class BatchTests(TestCase):
 
     def testEmpty(self):
         '''Test empty Batch'''
@@ -21,6 +23,7 @@
             assert b.next is None
             assert b.start == 1, b.start
             assert len(b) ==  b.end == bsize
+            assert b.sequence_length == len(seq)
             for i in seq:
                 assert b[i] == i, (b[i], i)
                 neg = -1 - i
@@ -33,12 +36,14 @@
             assert b.next is None
             assert len(b) == bsize
             assert b[bsize - 1] == bsize - 1
+            assert b.sequence_length == bsize
         b = Batch(range(8), 5)
         assert len(b) == 5
+        assert b.sequence_length == 8
         assert len(b.next) == 3
 
 def test_suite():
-    return unittest.makeSuite(BatchTests)
+    return makeSuite(BatchTests)
 
 if __name__=='__main__':
     main()