[Zope3-checkins] CVS: ZODB4/ZODB/tests - IteratorStorage.py:1.15 testUtils.py:1.3
Jeremy Hylton
jeremy@zope.com
Thu, 1 Aug 2002 12:24:22 -0400
Update of /cvs-repository/ZODB4/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv12992/ZODB/tests
Modified Files:
IteratorStorage.py testUtils.py
Log Message:
U64 -> u64 conversion.
=== ZODB4/ZODB/tests/IteratorStorage.py 1.14 => 1.15 ===
from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle
-from ZODB.utils import U64, p64
+from ZODB.utils import u64, p64
from ZODB.ZTransaction import Transaction
@@ -139,14 +139,14 @@
txniter = self._storage.iterator(revid2, revid3)
self.iter_verify(txniter, [revid2, revid3], 12)
# Specify an upper bound somewhere in between values
- revid3a = p64((U64(revid3) + U64(revid4)) / 2)
+ revid3a = p64((u64(revid3) + u64(revid4)) / 2)
txniter = self._storage.iterator(revid2, revid3a)
self.iter_verify(txniter, [revid2, revid3], 12)
# Specify a lower bound somewhere in between values.
# revid2 == revid1+1 is very likely on Windows. Adding 1 before
# dividing ensures that "the midpoint" we compute is strictly larger
# than revid1.
- revid1a = p64((U64(revid1) + 1 + U64(revid2)) / 2)
+ revid1a = p64((u64(revid1) + 1 + u64(revid2)) / 2)
assert revid1 < revid1a
txniter = self._storage.iterator(revid1a, revid3a)
self.iter_verify(txniter, [revid2, revid3], 12)
=== ZODB4/ZODB/tests/testUtils.py 1.2 => 1.3 ===
NUM = 100
-from ZODB.utils import U64, p64, u64
+from ZODB.utils import p64, u64
class TestUtils(unittest.TestCase):
@@ -31,8 +31,6 @@
def checkLongToStringToLong(self):
for num in self.all:
s = p64(num)
- n = U64(s)
- self.assertEquals(num, n, "U64() failed")
n2 = u64(s)
self.assertEquals(num, n2, "u64() failed")
@@ -40,9 +38,7 @@
self.assertEquals("\000\000\000\000\000\000\000\001", p64(1))
self.assertEquals("\000\000\000\001\000\000\000\000", p64(1L<<32))
self.assertEquals(u64("\000\000\000\000\000\000\000\001"), 1)
- self.assertEquals(U64("\000\000\000\000\000\000\000\001"), 1)
self.assertEquals(u64("\000\000\000\001\000\000\000\000"), 1L<<32)
- self.assertEquals(U64("\000\000\000\001\000\000\000\000"), 1L<<32)
def test_suite():
return unittest.makeSuite(TestUtils, 'check')