Commit 35f80c80 authored by Jeremy Hylton's avatar Jeremy Hylton

Python 2.1 compatibility.

parent 07766aca
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
# FOR A PARTICULAR PURPOSE. # FOR A PARTICULAR PURPOSE.
# #
############################################################################## ##############################################################################
from __future__ import nested_scopes
import unittest import unittest
import ZODB import ZODB
...@@ -250,14 +252,14 @@ class ZODBTests(unittest.TestCase): ...@@ -250,14 +252,14 @@ class ZODBTests(unittest.TestCase):
real_data2 = r2["real_data"] real_data2 = r2["real_data"]
index2 = r2["index"] index2 = r2["index"]
real_data["b"]["indexed_value"] = False real_data["b"]["indexed_value"] = 0
del index[1]["b"] del index[1]["b"]
index[0]["b"] = 1 index[0]["b"] = 1
cn2.getTransaction().commit() cn2.getTransaction().commit()
del real_data2["a"] del real_data2["a"]
try: try:
del index2[False]["a"] del index2[0]["a"]
except ReadConflictError: except ReadConflictError:
# This is the crux of the text. Ignore the error. # This is the crux of the text. Ignore the error.
pass pass
...@@ -277,7 +279,7 @@ class ZODBTests(unittest.TestCase): ...@@ -277,7 +279,7 @@ class ZODBTests(unittest.TestCase):
def checkIndependent(self): def checkIndependent(self):
self.obj = Independent() self.obj = Independent()
self.readConflict(shouldFail=False) self.readConflict(shouldFail=0)
def checkNotIndependent(self): def checkNotIndependent(self):
self.obj = DecoyIndependent() self.obj = DecoyIndependent()
......
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