[Zope-Checkins] CVS: Zope2 - LocalStorage.py:1.1 BasicStorage.py:1.4

jeremy@digicool.com jeremy@digicool.com
Wed, 2 May 2001 10:44:15 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/ZODB/tests
In directory korak:/tmp/cvs-serv25251

Modified Files:
	BasicStorage.py 
Added Files:
	LocalStorage.py 
Log Message:
Remove checkLen() from BasicStorage and add it to LocalStorage.



--- Added File LocalStorage.py in package Zope2/lib/python/ZODB ---
class LocalStorage:
    """A single test that only make sense for local storages.

    A local storage is one that doens't use ZEO. The __len__()
    implementation for ZEO is inexact.
    """
    def checkLen(self):
        # The length of the database ought to grow by one each time
        assert len(self._storage) == 0
        self._dostore()
        assert len(self._storage) == 1
        self._dostore()
        assert len(self._storage) == 2


--- Updated File BasicStorage.py in package Zope2/lib/python/ZODB --
--- BasicStorage.py	2001/04/12 23:33:51	1.3
+++ BasicStorage.py	2001/05/02 14:44:13	1.4
@@ -68,14 +68,6 @@
         # Finish the transaction.
         assert newrevid <> revid
 
-    def checkLen(self):
-        # The length of the database ought to grow by one each time
-        assert len(self._storage) == 0
-        self._dostore()
-        assert len(self._storage) == 1
-        self._dostore()
-        assert len(self._storage) == 2
-
     def checkNonVersionStoreAndLoad(self):
         oid = self._storage.new_oid()
         self._dostore(oid=oid, data=7)



--- Added File LocalStorage.py in package Zope2 ---
class LocalStorage:
    """A single test that only make sense for local storages.

    A local storage is one that doens't use ZEO. The __len__()
    implementation for ZEO is inexact.
    """
    def checkLen(self):
        # The length of the database ought to grow by one each time
        assert len(self._storage) == 0
        self._dostore()
        assert len(self._storage) == 1
        self._dostore()
        assert len(self._storage) == 2


--- Updated File BasicStorage.py in package Zope2 --
--- BasicStorage.py	2001/04/12 23:33:51	1.3
+++ BasicStorage.py	2001/05/02 14:44:13	1.4
@@ -68,14 +68,6 @@
         # Finish the transaction.
         assert newrevid <> revid
 
-    def checkLen(self):
-        # The length of the database ought to grow by one each time
-        assert len(self._storage) == 0
-        self._dostore()
-        assert len(self._storage) == 1
-        self._dostore()
-        assert len(self._storage) == 2
-
     def checkNonVersionStoreAndLoad(self):
         oid = self._storage.new_oid()
         self._dostore(oid=oid, data=7)