[Zope3-checkins] CVS: Zope3/src/zope/proxy/tests - test_proxy.py:1.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 1 Apr 2003 11:08:43 -0500
Update of /cvs-repository/Zope3/src/zope/proxy/tests
In directory cvs.zope.org:/tmp/cvs-serv6577
Modified Files:
test_proxy.py
Log Message:
Add test that demonstrates that proxies on iterators work just fine.
=== Zope3/src/zope/proxy/tests/test_proxy.py 1.2 => 1.3 ===
--- Zope3/src/zope/proxy/tests/test_proxy.py:1.2 Wed Dec 25 09:15:17 2002
+++ Zope3/src/zope/proxy/tests/test_proxy.py Tue Apr 1 11:08:42 2003
@@ -166,6 +166,15 @@
b.append(x)
self.assertEquals(a, b)
+ def test_wrapped_iterator(self):
+ a = [1, 2, 3]
+ b = []
+ for x in self.new_proxy(iter(a)):
+ b.append(x)
+ self.assertEquals(a, b)
+ t = tuple(self.new_proxy(iter(a)))
+ self.assertEquals(t, (1, 2, 3))
+
def test_bool_wrapped_None(self):
w = self.new_proxy(None)
self.assertEquals(not w, 1)