[Checkins] SVN: Acquisition/trunk/src/Acquisition/tests.py failing test for edge case where parent pointers are returned with unwanted wrapping
David Glick
davidglick at onenw.org
Tue Nov 1 22:30:49 UTC 2011
Log message for revision 123238:
failing test for edge case where parent pointers are returned with unwanted wrapping
Changed:
U Acquisition/trunk/src/Acquisition/tests.py
-=-
Modified: Acquisition/trunk/src/Acquisition/tests.py
===================================================================
--- Acquisition/trunk/src/Acquisition/tests.py 2011-11-01 22:28:36 UTC (rev 123237)
+++ Acquisition/trunk/src/Acquisition/tests.py 2011-11-01 22:30:49 UTC (rev 123238)
@@ -2362,7 +2362,7 @@
>>> x.__parent__.__parent__ is x
True
-
+
>>> x.hello
'world'
>>> Acquisition.aq_acquire(x, 'hello')
@@ -2396,6 +2396,23 @@
AttributeError: non_existant_attr
"""
+def test_unwrapped_implicit_acquirer_unwraps__parent__():
+ """
+ Set up an implicit acquirer with a parent:
+
+ >>> class Impl(Acquisition.Implicit):
+ ... pass
+
+ >>> y = Impl()
+ >>> x = Impl()
+ >>> x.__parent__ = y
+
+ Now if we retrieve the parent from the (unwrapped) instance,
+ the parent should not be wrapped in the instance's acquisition chain.
+
+ >>> x.__parent__ is y
+ True
+ """
import unittest
from doctest import DocTestSuite, DocFileSuite
More information about the checkins
mailing list