[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/ Fixed some typos in some error handling code.
Jim Fulton
jim at zope.com
Thu Dec 4 17:15:46 EST 2008
Log message for revision 93635:
Fixed some typos in some error handling code.
Changed:
U ZODB/trunk/src/ZODB/DemoStorage.py
U ZODB/trunk/src/ZODB/tests/testDemoStorage.py
-=-
Modified: ZODB/trunk/src/ZODB/DemoStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/DemoStorage.py 2008-12-04 22:15:41 UTC (rev 93634)
+++ ZODB/trunk/src/ZODB/DemoStorage.py 2008-12-04 22:15:45 UTC (rev 93635)
@@ -167,7 +167,7 @@
try:
return self.base.loadBlob(oid, serial)
except AttributeError:
- if not zope.interface.IBlobStorage.providBy(self.base):
+ if not ZODB.interfaces.IBlobStorage.providedBy(self.base):
raise ZODB.POSException.POSKeyError(oid, serial)
raise
except AttributeError:
@@ -182,7 +182,7 @@
try:
return self.base.openCommittedBlobFile(oid, serial, blob)
except AttributeError:
- if not zope.interface.IBlobStorage.providBy(self.base):
+ if not ZODB.interfaces.IBlobStorage.providedBy(self.base):
raise ZODB.POSException.POSKeyError(oid, serial)
raise
except AttributeError:
Modified: ZODB/trunk/src/ZODB/tests/testDemoStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testDemoStorage.py 2008-12-04 22:15:41 UTC (rev 93634)
+++ ZODB/trunk/src/ZODB/tests/testDemoStorage.py 2008-12-04 22:15:45 UTC (rev 93635)
@@ -156,7 +156,22 @@
"""
+def blob_pos_key_error_with_non_blob_base():
+ """
+ >>> storage = ZODB.DemoStorage.DemoStorage()
+ >>> storage.loadBlob(ZODB.utils.p64(1), ZODB.utils.p64(1))
+ Traceback (most recent call last):
+ ...
+ POSKeyError: 0x01
+ >>> storage.openCommittedBlobFile(ZODB.utils.p64(1), ZODB.utils.p64(1))
+ Traceback (most recent call last):
+ ...
+ POSKeyError: 0x01
+
+ """
+
+
def test_suite():
suite = unittest.TestSuite((
doctest.DocTestSuite(
More information about the Zodb-checkins
mailing list