Commit f5c7df2f authored by Tim Peters's avatar Tim Peters

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.
parent c2d3217e
...@@ -38,6 +38,13 @@ pickle = ('((U\x0bPersistenceq\x01U\x11PersistentMappingtq\x02Nt.}q\x03U\n' ...@@ -38,6 +38,13 @@ pickle = ('((U\x0bPersistenceq\x01U\x11PersistentMappingtq\x02Nt.}q\x03U\n'
class PMTests(unittest.TestCase): class PMTests(unittest.TestCase):
def checkOldStyleRoot(self): 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 # insert the pickle in place of the root
s = MappingStorage() s = MappingStorage()
t = Transaction() t = Transaction()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment