[Zope-Checkins] CVS: Zope/lib/python/ZODB/tests - BasicStorage.py:1.19.4.1 ConflictResolution.py:1.8.4.2 Corruption.py:1.6.4.1 HistoryStorage.py:1.7.4.1 IteratorStorage.py:1.12.4.1 LocalStorage.py:1.2.136.1 MTStorage.py:1.4.4.4 MinPO.py:1.2.166.1 PackableStorage.py:1.13.4.2 PersistentStorage.py:1.2.4.1 ReadOnlyStorage.py:1.3.4.2 RecoveryStorage.py:1.2.4.2 RevisionStorage.py:1.2.4.1 StorageTestBase.py:1.17.4.2 Synchronization.py:1.6.4.2 TransactionalUndoStorage.py:1.21.4.4 TransactionalUndoVersionStorage.py:1.8.4.3 VersionStorage.py:1.14.4.3 testCache.py:1.9.4.1 testDB.py:1.2.4.1 testDemoStorage.py:1.5.4.1 testFileStorage.py:1.19.4.2 testMappingStorage.py:1.4.4.1 testPersistentList.py:1.2.64.1 testPersistentMapping.py:1.4.4.1 testStorageConfig.py:1.4.2.2 testTimeStamp.py:1.3.66.1 testUtils.py:1.2.4.1 testZODB.py:1.4.4.3 testfsIndex.py:1.5.4.1

Chris McDonough chrism@zope.com
Fri, 3 Jan 2003 01:37:37 -0500


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

Modified Files:
      Tag: chrism-install-branch
	BasicStorage.py ConflictResolution.py Corruption.py 
	HistoryStorage.py IteratorStorage.py LocalStorage.py 
	MTStorage.py MinPO.py PackableStorage.py PersistentStorage.py 
	ReadOnlyStorage.py RecoveryStorage.py RevisionStorage.py 
	StorageTestBase.py Synchronization.py 
	TransactionalUndoStorage.py TransactionalUndoVersionStorage.py 
	VersionStorage.py testCache.py testDB.py testDemoStorage.py 
	testFileStorage.py testMappingStorage.py testPersistentList.py 
	testPersistentMapping.py testStorageConfig.py testTimeStamp.py 
	testUtils.py testZODB.py testfsIndex.py 
Log Message:
Merging chrism-install-branch with HEAD (hopefully for one of the last
times).



=== Zope/lib/python/ZODB/tests/BasicStorage.py 1.19 => 1.19.4.1 ===
--- Zope/lib/python/ZODB/tests/BasicStorage.py:1.19	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/BasicStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Run the basic tests for a storage as described in the official storage API
 
 The most complete and most out-of-date description of the interface is:


=== Zope/lib/python/ZODB/tests/ConflictResolution.py 1.8.4.1 => 1.8.4.2 ===
--- Zope/lib/python/ZODB/tests/ConflictResolution.py:1.8.4.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/ConflictResolution.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Tests for application-level conflict resolution."""
 
 from ZODB.Transaction import Transaction


=== Zope/lib/python/ZODB/tests/Corruption.py 1.6 => 1.6.4.1 ===
--- Zope/lib/python/ZODB/tests/Corruption.py:1.6	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/Corruption.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Do some minimal tests of data corruption"""
 
 import os


=== Zope/lib/python/ZODB/tests/HistoryStorage.py 1.7 => 1.7.4.1 ===
--- Zope/lib/python/ZODB/tests/HistoryStorage.py:1.7	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/HistoryStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Run the history() related tests for a storage.
 
 Any storage that supports the history() method should be able to pass


=== Zope/lib/python/ZODB/tests/IteratorStorage.py 1.12 => 1.12.4.1 ===
--- Zope/lib/python/ZODB/tests/IteratorStorage.py:1.12	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/IteratorStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Run tests against the iterator() interface for storages.
 
 Any storage that supports the iterator() method should be able to pass
@@ -101,6 +114,16 @@
         # None in the data attribute.
         self.assertEqual(rec.oid, oid)
         self.assertEqual(rec.data, None)
+
+    def checkTransactionExtensionFromIterator(self):
+        oid = self._storage.new_oid()
+        revid = self._dostore(oid, data=MinPO(1))
+        iter = self._storage.iterator()
+        count = 0
+        for txn in iter:
+            self.assertEqual(txn._extension, {})
+            count +=1
+        self.assertEqual(count, 1)
 
 
 class ExtendedIteratorStorage(IteratorCompare):


=== Zope/lib/python/ZODB/tests/LocalStorage.py 1.2 => 1.2.136.1 ===
--- Zope/lib/python/ZODB/tests/LocalStorage.py:1.2	Fri Sep 21 16:56:42 2001
+++ Zope/lib/python/ZODB/tests/LocalStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 class LocalStorage:
     """A single test that only make sense for local storages.
 


=== Zope/lib/python/ZODB/tests/MTStorage.py 1.4.4.3 => 1.4.4.4 ===
--- Zope/lib/python/ZODB/tests/MTStorage.py:1.4.4.3	Tue Oct  8 17:45:55 2002
+++ Zope/lib/python/ZODB/tests/MTStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import random
 import threading
 import time


=== Zope/lib/python/ZODB/tests/MinPO.py 1.2 => 1.2.166.1 ===
--- Zope/lib/python/ZODB/tests/MinPO.py:1.2	Tue May  8 17:30:04 2001
+++ Zope/lib/python/ZODB/tests/MinPO.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """A minimal persistent object to use for tests"""
 
 from Persistence import Persistent


=== Zope/lib/python/ZODB/tests/PackableStorage.py 1.13.4.1 => 1.13.4.2 ===
--- Zope/lib/python/ZODB/tests/PackableStorage.py:1.13.4.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/PackableStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Run some tests relevant for storages that support pack()."""
 
 try:


=== Zope/lib/python/ZODB/tests/PersistentStorage.py 1.2 => 1.2.4.1 ===
--- Zope/lib/python/ZODB/tests/PersistentStorage.py:1.2	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/PersistentStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Test that a storage's values persist across open and close."""
 
 class PersistentStorage:
@@ -13,7 +26,6 @@
         self._storage.new_oid = new_oid_wrapper
 
         self._dostore()
-        self._dostore('a')
         oid = self._storage.new_oid()
         revid = self._dostore(oid)
         self._dostore(oid, revid, data=8, version='b')


=== Zope/lib/python/ZODB/tests/ReadOnlyStorage.py 1.3.4.1 => 1.3.4.2 ===
--- Zope/lib/python/ZODB/tests/ReadOnlyStorage.py:1.3.4.1	Mon Sep 16 02:00:54 2002
+++ Zope/lib/python/ZODB/tests/ReadOnlyStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 from ZODB.POSException import ReadOnlyError
 from ZODB.Transaction import Transaction
 
@@ -30,8 +43,6 @@
     def checkWriteMethods(self):
         self._make_readonly()
         self.assertRaises(ReadOnlyError, self._storage.new_oid)
-        self.assertRaises(ReadOnlyError, self._storage.undo,
-                          '\000' * 8)
         t = Transaction()
         self.assertRaises(ReadOnlyError, self._storage.tpc_begin, t)
 


=== Zope/lib/python/ZODB/tests/RecoveryStorage.py 1.2.4.1 => 1.2.4.2 ===
--- Zope/lib/python/ZODB/tests/RecoveryStorage.py:1.2.4.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/RecoveryStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,9 +1,25 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """More recovery and iterator tests."""
 
 from ZODB.Transaction import Transaction
 from ZODB.tests.IteratorStorage import IteratorDeepCompare
 from ZODB.tests.StorageTestBase import MinPO, zodb_unpickle
+from ZODB import DB
+from ZODB.referencesf import referencesf
 
+import time
 
 class RecoveryStorage(IteratorDeepCompare):
     # Requires a setUp() that creates a self._dst destination storage
@@ -70,7 +86,13 @@
 
         # now copy the records to a new storage
         self._dst.copyTransactionsFrom(self._storage)
-        
+        self.compare(self._storage, self._dst)
+
+        # The last two transactions were applied directly rather than
+        # copied.  So we can't use compare() to verify that they new
+        # transactions are applied correctly.  (The new transactions
+        # will have different timestamps for each storage.)
+
         self._abortVersion(version)
         self.assert_(self._storage.versionEmpty(version))
         self._undo(self._storage.undoInfo()[0]['id'], oid)
@@ -96,10 +118,37 @@
         data, revid = self._storage.load(oid, '')
         self.assertEqual(zodb_unpickle(data), MinPO(91))
 
+        # swap them back
+        self._storage = tmp
+
         # Now remove _dst and copy all the transactions a second time.
         # This time we will be able to confirm via compare().
-        self._storage = tmp
         self._dst.close()
+        self._dst.cleanup()
         self._dst = self.new_dest()
         self._dst.copyTransactionsFrom(self._storage)
         self.compare(self._storage, self._dst)
+        
+    def checkRestoreAcrossPack(self):
+        db = DB(self._storage)
+        c = db.open()
+        r = c.root()
+        obj = r["obj1"] = MinPO(1)
+        get_transaction().commit()
+        obj = r["obj2"] = MinPO(1)
+        get_transaction().commit()
+
+        self._dst.copyTransactionsFrom(self._storage)
+        self._dst.pack(time.time(), referencesf)
+
+        self._undo(self._storage.undoInfo()[0]['id'])
+
+        # copy the final transaction manually.  even though there
+        # was a pack, the restore() ought to succeed.
+        final = list(self._storage.iterator())[-1]
+        self._dst.tpc_begin(final, final.tid, final.status)
+        for r in final:
+            self._dst.restore(r.oid, r.serial, r.data, r.version, r.data_txn,
+                              final)
+        self._dst.tpc_vote(final)
+        self._dst.tpc_finish(final)


=== Zope/lib/python/ZODB/tests/RevisionStorage.py 1.2 => 1.2.4.1 ===
--- Zope/lib/python/ZODB/tests/RevisionStorage.py:1.2	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/RevisionStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Check loadSerial() on storages that support historical revisions."""
 
 from ZODB.tests.MinPO import MinPO


=== Zope/lib/python/ZODB/tests/StorageTestBase.py 1.17.4.1 => 1.17.4.2 ===
--- Zope/lib/python/ZODB/tests/StorageTestBase.py:1.17.4.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/StorageTestBase.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Provide a mixin base class for storage tests.
 
 The StorageTestBase class provides basic setUp() and tearDown()
@@ -180,9 +193,10 @@
     def _dostoreNP(self, oid=None, revid=None, data=None, version=None,
                    user=None, description=None):
         return self._dostore(oid, revid, data, version, already_pickled=1)
+    
     # The following methods depend on optional storage features.
 
-    def _undo(self, tid, oid):
+    def _undo(self, tid, oid=None):
         # Undo a tid that affects a single object (oid).
         # XXX This is very specialized
         t = Transaction()
@@ -191,8 +205,9 @@
         oids = self._storage.transactionalUndo(tid, t)
         self._storage.tpc_vote(t)
         self._storage.tpc_finish(t)
-        self.assertEqual(len(oids), 1)
-        self.assertEqual(oids[0], oid)
+        if oid is not None:
+            self.assertEqual(len(oids), 1)
+            self.assertEqual(oids[0], oid)
         return self._storage.lastTransaction()
 
     def _commitVersion(self, src, dst):


=== Zope/lib/python/ZODB/tests/Synchronization.py 1.6.4.1 => 1.6.4.2 ===
--- Zope/lib/python/ZODB/tests/Synchronization.py:1.6.4.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/Synchronization.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Test the storage's implemenetation of the storage synchronization spec.
 
 The Synchronization spec


=== Zope/lib/python/ZODB/tests/TransactionalUndoStorage.py 1.21.4.3 => 1.21.4.4 ===
--- Zope/lib/python/ZODB/tests/TransactionalUndoStorage.py:1.21.4.3	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/TransactionalUndoStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Check transactionalUndo().
 
 Any storage that supports transactionalUndo() must pass these tests.


=== Zope/lib/python/ZODB/tests/TransactionalUndoVersionStorage.py 1.8.4.2 => 1.8.4.3 ===
--- Zope/lib/python/ZODB/tests/TransactionalUndoVersionStorage.py:1.8.4.2	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/TransactionalUndoVersionStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 from __future__ import nested_scopes
 
 # Check interactions between transactionalUndo() and versions.  Any storage


=== Zope/lib/python/ZODB/tests/VersionStorage.py 1.14.4.2 => 1.14.4.3 ===
--- Zope/lib/python/ZODB/tests/VersionStorage.py:1.14.4.2	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/VersionStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Run the version related tests for a storage.
 
 Any storage that supports versions should be able to pass all these tests.


=== Zope/lib/python/ZODB/tests/testCache.py 1.9 => 1.9.4.1 ===
--- Zope/lib/python/ZODB/tests/testCache.py:1.9	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testCache.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """A few simple tests of the public cache API.
 
 Each DB Connection has a separate PickleCache.  The Cache serves two


=== Zope/lib/python/ZODB/tests/testDB.py 1.2 => 1.2.4.1 ===
--- Zope/lib/python/ZODB/tests/testDB.py:1.2	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testDB.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import time
 import unittest
 


=== Zope/lib/python/ZODB/tests/testDemoStorage.py 1.5 => 1.5.4.1 ===
--- Zope/lib/python/ZODB/tests/testDemoStorage.py:1.5	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testDemoStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import ZODB.DemoStorage
 import os, unittest
 


=== Zope/lib/python/ZODB/tests/testFileStorage.py 1.19.4.1 => 1.19.4.2 ===
--- Zope/lib/python/ZODB/tests/testFileStorage.py:1.19.4.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/testFileStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 from __future__ import nested_scopes
 
 import ZODB.FileStorage
@@ -24,6 +37,7 @@
     PackableStorage.PackableStorage,
     Synchronization.SynchronizedStorage,
     ConflictResolution.ConflictResolvingStorage,
+    ConflictResolution.ConflictResolvingTransUndoStorage,
     HistoryStorage.HistoryStorage,
     IteratorStorage.IteratorStorage,
     IteratorStorage.ExtendedIteratorStorage,


=== Zope/lib/python/ZODB/tests/testMappingStorage.py 1.4 => 1.4.4.1 ===
--- Zope/lib/python/ZODB/tests/testMappingStorage.py:1.4	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testMappingStorage.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import ZODB.MappingStorage
 import os, unittest
 


=== Zope/lib/python/ZODB/tests/testPersistentList.py 1.2 => 1.2.64.1 ===
--- Zope/lib/python/ZODB/tests/testPersistentList.py:1.2	Mon Feb 11 18:49:08 2002
+++ Zope/lib/python/ZODB/tests/testPersistentList.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Test the list interface to PersistentList
 """
 


=== Zope/lib/python/ZODB/tests/testPersistentMapping.py 1.4 => 1.4.4.1 ===
--- Zope/lib/python/ZODB/tests/testPersistentMapping.py:1.4	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testPersistentMapping.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Verify that PersistentMapping works with old versions of Zope.
 
 The comments in PersistentMapping.py address the issue in some detail.


=== Zope/lib/python/ZODB/tests/testStorageConfig.py 1.4.2.1 => 1.4.2.2 ===
--- Zope/lib/python/ZODB/tests/testStorageConfig.py:1.4.2.1	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/testStorageConfig.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import os
 import shutil
 import tempfile
@@ -25,7 +38,7 @@
         except:
             pass
         try:
-            # Full storage creates a directory
+            # BDBFullStorage storage creates a directory
             if os.path.isdir(self.tmpfn):
                 shutil.rmtree(self.tmpfn)
             else:
@@ -104,12 +117,12 @@
 
     def testFullStorage(self):
         try:
-            from bsddb3Storage.Full import Full
+            from BDBStorage.BDBFullStorage import BDBFullStorage
         except ImportError:
             return
         sample = """
         <Storage>
-        type       Full
+        type       BDBFullStorage
         name       %s
         cachesize  1000
         </Storage>
@@ -119,24 +132,24 @@
         rootconf = ZConfig.loadfile(io)
         storageconf = rootconf.getSection("Storage")
         cls, args = StorageConfig.getStorageInfo(storageconf)
-        self.assertEqual(cls, Full)
+        self.assertEqual(cls, BDBFullStorage)
         # It's too hard to test the config instance equality
         args = args.copy()
         del args['config']
         self.assertEqual(args, {"name": self.tmpfn})
         self.storage = StorageConfig.createStorage(storageconf)
-        self.assert_(isinstance(self.storage, Full))
+        self.assert_(isinstance(self.storage, BDBFullStorage))
         # XXX _config isn't public
         self.assert_(self.storage._config.cachesize, 1000)
 
     def testMinimalStorage(self):
         try:
-            from bsddb3Storage.Minimal import Minimal
+            from BDBStorage.BDBMinimalStorage import BDBMinimalStorage
         except ImportError:
             return
         sample = """
         <Storage>
-        type       Minimal
+        type       BDBMinimalStorage
         name       %s
         cachesize  1000
         </Storage>
@@ -146,13 +159,13 @@
         rootconf = ZConfig.loadfile(io)
         storageconf = rootconf.getSection("Storage")
         cls, args = StorageConfig.getStorageInfo(storageconf)
-        self.assertEqual(cls, Minimal)
+        self.assertEqual(cls, BDBMinimalStorage)
         # It's too hard to test the config instance equality
         args = args.copy()
         del args['config']
         self.assertEqual(args, {"name": self.tmpfn})
         self.storage = StorageConfig.createStorage(storageconf)
-        self.assert_(isinstance(self.storage, Minimal))
+        self.assert_(isinstance(self.storage, BDBMinimalStorage))
         # XXX _config isn't public
         self.assert_(self.storage._config.cachesize, 1000)
 


=== Zope/lib/python/ZODB/tests/testTimeStamp.py 1.3 => 1.3.66.1 ===
--- Zope/lib/python/ZODB/tests/testTimeStamp.py:1.3	Sat Jan 26 23:01:17 2002
+++ Zope/lib/python/ZODB/tests/testTimeStamp.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Test the TimeStamp utility type"""
 
 import time
@@ -28,7 +41,7 @@
         self.assertEquals(dy, t[2])
 
     def checkFullTimeStamp(self):
-        t = time.gmtime(time.time())
+        t = time.gmtime()
         ts = TimeStamp(*t[:6])
 
         # XXX floating point comparison
@@ -43,7 +56,7 @@
         self.assert_(abs(ts.second() - t[5]) < EPSILON)
 
     def checkRawTimestamp(self):
-        t = time.gmtime(time.time())
+        t = time.gmtime()
         ts1 = TimeStamp(*t[:6])
         ts2 = TimeStamp(`ts1`)
 
@@ -57,7 +70,7 @@
         self.assert_(abs(ts1.second() - ts2.second()) < EPSILON)
 
     def checkDictKey(self):
-        t = time.gmtime(time.time())
+        t = time.gmtime()
         ts1 = TimeStamp(*t[:6])
         ts2 = TimeStamp(2000, *t[1:6])
 
@@ -74,8 +87,7 @@
         self.assert_(ts2 <= ts1)
 
     def checkLaterThan(self):
-        # XXX what does laterThan() do?
-        t = time.gmtime(time.time())
+        t = time.gmtime()
         ts = TimeStamp(*t[:6])
         ts2 = ts.laterThan(ts)
         self.assert_(ts2 > ts)


=== Zope/lib/python/ZODB/tests/testUtils.py 1.2 => 1.2.4.1 ===
--- Zope/lib/python/ZODB/tests/testUtils.py:1.2	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testUtils.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 """Test the routines to convert between long and 64-bit strings"""
 
 import random


=== Zope/lib/python/ZODB/tests/testZODB.py 1.4.4.2 => 1.4.4.3 ===
--- Zope/lib/python/ZODB/tests/testZODB.py:1.4.4.2	Sun Nov 24 19:10:13 2002
+++ Zope/lib/python/ZODB/tests/testZODB.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import sys, os
 
 import ZODB


=== Zope/lib/python/ZODB/tests/testfsIndex.py 1.5 => 1.5.4.1 ===
--- Zope/lib/python/ZODB/tests/testfsIndex.py:1.5	Wed Aug 14 18:07:09 2002
+++ Zope/lib/python/ZODB/tests/testfsIndex.py	Fri Jan  3 01:37:26 2003
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
 import unittest, sys
 from ZODB.fsIndex import fsIndex
 from ZODB.utils import p64