[Zodb-checkins]
SVN: ZODB/trunk/src/ZODB/tests/testPersistentMapping.py
Merge rev 29849 from 3.4 branch.
Tim Peters
tim.one at comcast.net
Sat Apr 2 19:01:03 EST 2005
Log message for revision 29850:
Merge rev 29849 from 3.4 branch.
checkOldStyleRoot: Can't work in Zope3.
The Persistence module no longer exists in Zope3's idea of what
ZODB is, but this test relies on it. Make it tolerate the
absence of Persistence.
Changed:
U ZODB/trunk/src/ZODB/tests/testPersistentMapping.py
-=-
Modified: ZODB/trunk/src/ZODB/tests/testPersistentMapping.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/testPersistentMapping.py 2005-04-02 23:57:50 UTC (rev 29849)
+++ ZODB/trunk/src/ZODB/tests/testPersistentMapping.py 2005-04-03 00:01:03 UTC (rev 29850)
@@ -38,6 +38,13 @@
class PMTests(unittest.TestCase):
def checkOldStyleRoot(self):
+ # The Persistence module doesn't exist in Zope3's idea of what ZODB
+ # is, but the global `pickle` references it explicitly. So just
+ # bail if Persistence isn't available.
+ try:
+ import Persistence
+ except ImportError:
+ return
# insert the pickle in place of the root
s = MappingStorage()
t = Transaction()
More information about the Zodb-checkins
mailing list