[Zope3-checkins] CVS: Zope3/src/zodb/storage/tests - basic.py:1.1.2.2 test_file.py:1.1.2.2 test_storage_api.py:1.1.2.2 undo.py:1.1.2.2 undoversion.py:1.1.2.2 version.py:1.1.2.2

Barry Warsaw barry@wooz.org
Mon, 23 Dec 2002 16:53:24 -0500


Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv14542/src/zodb/storage/tests

Modified Files:
      Tag: NameGeddon-branch
	basic.py test_file.py test_storage_api.py undo.py 
	undoversion.py version.py 
Log Message:
Deunfrakificationlinessification


=== Zope3/src/zodb/storage/tests/basic.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/basic.py:1.1.2.1	Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/basic.py	Mon Dec 23 16:52:53 2002
@@ -22,7 +22,7 @@
 """
 
 from zodb.ztransaction import Transaction
-from zodb import POSException
+from zodb import interfaces
 
 from zodb.storage.tests.minpo import MinPO
 from zodb.storage.tests.base \
@@ -44,28 +44,28 @@
         # different Transaction object than the one we've begun on.
         self._storage.tpc_begin(t)
         self.assertRaises(
-            POSException.StorageTransactionError,
+            interfaces.StorageTransactionError,
             self._storage.store,
             0, 0, 0, 0, Transaction())
 
         try:
             self._storage.abortVersion('dummy', Transaction())
-        except (POSException.StorageTransactionError,
-                POSException.VersionCommitError):
+        except (interfaces.StorageTransactionError,
+                interfaces.VersionCommitError):
             pass # test passed ;)
         else:
             assert 0, "Should have failed, invalid transaction."
 
         try:
             self._storage.commitVersion('dummy', 'dummer', Transaction())
-        except (POSException.StorageTransactionError,
-                POSException.VersionCommitError):
+        except (interfaces.StorageTransactionError,
+                interfaces.VersionCommitError):
             pass # test passed ;)
         else:
             assert 0, "Should have failed, invalid transaction."
 
         self.assertRaises(
-            POSException.StorageTransactionError,
+            interfaces.StorageTransactionError,
             self._storage.store,
             0, 1, 2, 3, Transaction())
         self._storage.tpc_abort(t)
@@ -116,7 +116,7 @@
         oid = self._storage.new_oid()
         revid1 = self._dostore(oid, data=MinPO(11))
         revid2 = self._dostore(oid, revid=revid1, data=MinPO(12))
-        self.assertRaises(POSException.ConflictError,
+        self.assertRaises(interfaces.ConflictError,
                           self._dostore,
                           oid, revid=revid1, data=MinPO(13))
 


=== Zope3/src/zodb/storage/tests/test_file.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_file.py:1.1.2.1	Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_file.py	Mon Dec 23 16:52:53 2002
@@ -15,7 +15,7 @@
 import sys, os, unittest
 import errno
 from zodb.ztransaction import Transaction
-from zodb import POSException
+from zodb import interfaces
 
 from zodb.storage.tests import StorageTestBase, BasicStorage, \
      TransactionalUndoStorage, VersionStorage, \
@@ -60,13 +60,13 @@
         s = "X" * 75000
         try:
             self._dostore(user=s)
-        except POSException.StorageError:
+        except interfaces.StorageError:
             pass
         else:
             self.fail("expect long user field to raise error")
         try:
             self._dostore(description=s)
-        except POSException.StorageError:
+        except interfaces.StorageError:
             pass
         else:
             self.fail("expect long user field to raise error")


=== Zope3/src/zodb/storage/tests/test_storage_api.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_storage_api.py:1.1.2.1	Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_storage_api.py	Mon Dec 23 16:52:53 2002
@@ -19,7 +19,7 @@
 # suite to ignore these tests.
 import bsddb3
 
-from zodb import POSException
+from zodb import interfaces
 
 import zodb.storage.tests.base
 from zodb.storage.tests.basic import BasicStorage
@@ -40,7 +40,7 @@
     def checkVersionedStoreAndLoad(self):
         # This storage doesn't support versions, so we should get an exception
         oid = self._storage.new_oid()
-        self.assertRaises(POSException.Unsupported,
+        self.assertRaises(interfaces.Unsupported,
                           self._dostore,
                           oid, data=11, version='a version')
 


=== Zope3/src/zodb/storage/tests/undo.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/undo.py:1.1.2.1	Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/undo.py	Mon Dec 23 16:52:53 2002
@@ -6,7 +6,7 @@
 import time
 import types
 
-from zodb import POSException
+from zodb import interfaces
 from zodb.ztransaction import Transaction
 from zodb.utils import u64, p64, z64
 from zodb.db import DB
@@ -402,7 +402,7 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        self.assertRaises(POSException.UndoError,
+        self.assertRaises(interfaces.UndoError,
                           self._storage.transactionalUndo,
                           tid, t)
         self._storage.tpc_abort(t)
@@ -441,7 +441,7 @@
         tid = info[1]['id']
         t = Transaction()
         self._storage.tpc_begin(t)
-        self.assertRaises(POSException.UndoError,
+        self.assertRaises(interfaces.UndoError,
                           self._storage.transactionalUndo,
                           tid, t)
         self._storage.tpc_abort(t)


=== Zope3/src/zodb/storage/tests/undoversion.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/undoversion.py:1.1.2.1	Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/undoversion.py	Mon Dec 23 16:52:53 2002
@@ -14,7 +14,6 @@
 # Check interactions between transactionalUndo() and versions.  Any storage
 # that supports both transactionalUndo() and versions must pass these tests.
 
-from zodb import POSException
 from zodb.ztransaction import Transaction
 from zodb.storage.tests.minpo import MinPO
 from zodb.storage.tests.base import zodb_unpickle


=== Zope3/src/zodb/storage/tests/version.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/version.py:1.1.2.1	Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/version.py	Mon Dec 23 16:52:53 2002
@@ -16,7 +16,7 @@
 Any storage that supports versions should be able to pass all these tests.
 """
 
-from zodb import POSException
+from zodb import interfaces
 from zodb.ztransaction import Transaction
 from zodb.storage.tests.minpo import MinPO
 from zodb.storage.tests.base import zodb_unpickle
@@ -67,7 +67,7 @@
         version = 'test-version'
         revid = self._dostore(oid, revid=revid, data=MinPO(12),
                               version=version)
-        self.assertRaises(POSException.VersionLockError,
+        self.assertRaises(interfaces.VersionLockError,
                           self._dostore,
                           oid, revid=revid, data=MinPO(14),
                           version='another-version')
@@ -166,7 +166,7 @@
         if (hasattr(self._storage, 'supportsTransactionalUndo')
             and self._storage.supportsTransactionalUndo()):
             # XXX FileStorage used to be broken on this one
-            self.assertRaises(POSException.VersionError,
+            self.assertRaises(interfaces.VersionError,
                               self._storage.abortVersion,
                               '', t)
         
@@ -191,7 +191,7 @@
         t = Transaction()
         self._storage.tpc_begin(t)
         try:
-            self.assertRaises(POSException.VersionCommitError,
+            self.assertRaises(interfaces.VersionCommitError,
                               self._storage.commitVersion,
                               'one', 'one', t)
         finally: