Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
40f0d21a
Commit
40f0d21a
authored
Oct 01, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backported c116931 from trunk
parent
53757933
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
42 deletions
+14
-42
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
src/Testing/ZopeTestCase/testZODBCompat.py
src/Testing/ZopeTestCase/testZODBCompat.py
+11
-42
No files found.
doc/CHANGES.rst
View file @
40f0d21a
...
...
@@ -11,6 +11,9 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++
- Fixed ``testZODBCompat`` tests in ZopeTestCase to match modern ZODB
semantics.
- Fixed unit test that failed on fast Windows machines.
- Fixed OverflowError in Products.ZCatalog.Lazy on 64bit python
...
...
src/Testing/ZopeTestCase/testZODBCompat.py
View file @
40f0d21a
...
...
@@ -322,50 +322,19 @@ class TestAttributesOfDirtyObjects(ZopeTestCase.ZopeTestCase):
class
TestTransactionAbort
(
ZopeTestCase
.
ZopeTestCase
):
def
testTransactionAbort
(
self
):
self
.
folder
.
foo
=
1
self
.
failUnless
(
hasattr
(
self
.
folder
,
'foo'
))
transaction
.
abort
()
# The foo attribute is still present
self
.
failUnless
(
hasattr
(
self
.
folder
,
'foo'
))
def
testSubTransactionAbort
(
self
):
self
.
folder
.
foo
=
1
self
.
failUnless
(
hasattr
(
self
.
folder
,
'foo'
))
transaction
.
savepoint
(
optimistic
=
True
)
transaction
.
abort
()
# This time the abort nukes the foo attribute...
self
.
failIf
(
hasattr
(
self
.
folder
,
'foo'
))
def
testTransactionAbortPersistent
(
self
):
self
.
folder
.
_p_foo
=
1
self
.
failUnless
(
hasattr
(
self
.
folder
,
'_p_foo'
))
transaction
.
abort
()
# The _p_foo attribute is still present
self
.
failUnless
(
hasattr
(
self
.
folder
,
'_p_foo'
))
def
_getfolder
(
self
):
return
getattr
(
self
.
app
,
folder_name
,
None
)
def
testSubTransactionAbortPersistent
(
self
):
self
.
folder
.
_p_foo
=
1
self
.
failUnless
(
hasattr
(
self
.
folder
,
'_p_foo'
))
transaction
.
savepoint
(
optimistic
=
True
)
transaction
.
abort
()
# This time the abort nukes the _p_foo attribute...
self
.
failIf
(
hasattr
(
self
.
folder
,
'_p_foo'
))
def
testTransactionAbortVolatile
(
self
):
self
.
folder
.
_v_foo
=
1
self
.
failUnless
(
hasattr
(
self
.
folder
,
'_v_foo'
))
transaction
.
abort
()
# The _v_foo attribute is still present
self
.
failUnless
(
hasattr
(
self
.
folder
,
'_v_foo'
))
def
testSubTransactionAbortVolatile
(
self
):
self
.
folder
.
_v_foo
=
1
self
.
failUnless
(
hasattr
(
self
.
folder
,
'_v_foo'
))
transaction
.
savepoint
(
optimistic
=
True
)
def
testTransactionAbort
(
self
):
folder
=
self
.
_getfolder
()
self
.
assert_
(
folder
is
not
None
)
self
.
assert_
(
folder
.
_p_jar
is
None
)
transaction
.
savepoint
()
self
.
assert_
(
folder
.
_p_jar
is
not
None
)
transaction
.
abort
()
# This time the abort nukes the _v_foo attribute...
self
.
failIf
(
hasattr
(
self
.
folder
,
'_v_foo'
))
del
folder
folder
=
self
.
_getfolder
()
self
.
assert_
(
folder
is
None
)
def
test_suite
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment