[Zope3-checkins] CVS: Zope3/src/zope/proxy/tests - test_proxy.py:1.14
Jim Fulton
jim@zope.com
Tue, 1 Jul 2003 19:26:39 -0400
Update of /cvs-repository/Zope3/src/zope/proxy/tests
In directory cvs.zope.org:/tmp/cvs-serv6159/tests
Modified Files:
test_proxy.py
Log Message:
Added a convenience function, ProxyIterator for easily inspecting
nested proxies.
=== Zope3/src/zope/proxy/tests/test_proxy.py 1.13 => 1.14 ===
--- Zope3/src/zope/proxy/tests/test_proxy.py:1.13 Fri Jun 6 20:15:03 2003
+++ Zope3/src/zope/proxy/tests/test_proxy.py Tue Jul 1 19:26:38 2003
@@ -382,6 +382,21 @@
"""
+def test_ProxyIterator():
+ """
+ >>> from zope.proxy import ProxyBase, ProxyIterator
+ >>> class C:
+ ... pass
+ >>> c = C()
+ >>> p1 = ProxyBase(c)
+ >>> class P(ProxyBase):
+ ... pass
+ >>> p2 = P(p1)
+ >>> p3 = ProxyBase(p2)
+ >>> list(ProxyIterator(p3)) == [p3, p2, p1, c]
+ 1
+ """
+
def test_removeAllProxies():
"""
>>> from zope.proxy import ProxyBase, removeAllProxies