[Zope-Checkins] CVS: Zope/lib/python/ZTUtils/tests - testBatch.py:1.7.66.1

Andreas Jung andreas at andreas-jung.com
Fri May 28 09:39:07 EDT 2004


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

Modified Files:
      Tag: Zope-2_7-branch
	testBatch.py 
Log Message:

     - Collector #1265: Fixed handling of orphans in ZTUtil.Batch


=== Zope/lib/python/ZTUtils/tests/testBatch.py 1.7 => 1.7.66.1 ===
--- Zope/lib/python/ZTUtils/tests/testBatch.py:1.7	Wed Aug 14 18:10:12 2002
+++ Zope/lib/python/ZTUtils/tests/testBatch.py	Fri May 28 09:39:06 2004
@@ -42,6 +42,12 @@
         assert b.sequence_length == 8
         assert len(b.next) == 3
 
+    def testLengthEqualsSizePlusOrphans(self):
+        '''Test limit case where batch length is equal to size + orphans'''
+        for bsize in (12, 14):
+            b = Batch(range(bsize), size=10, start=1, end=0, orphan=3, overlap=0)
+            assert b.length = b.sequence_length
+    
 def test_suite():
     return makeSuite(BatchTests)
 




More information about the Zope-Checkins mailing list