[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/PropertySets/tests - PropertySet.py:1.3
Jeremy Hylton
jeremy@zope.com
Tue, 16 Jul 2002 18:28:00 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/PropertySets/tests
In directory cvs.zope.org:/tmp/cvs-serv2906
Modified Files:
PropertySet.py
Log Message:
Fix SyntaxError
XXX Why wasn't this syntax error caught? If this code isn't used by
anything, perhaps it should be removed.
Also, list() accepts iterable objects directly, so there is no need to
call __iter__() explicitly when the result will just be passed to list().
Also, put pass stmt on separate line.
=== Zope3/lib/python/Zope/App/OFS/PropertySets/tests/PropertySet.py 1.2 => 1.3 ===
#
##############################################################################
from Zope.App.OFS.PropertySets.PropertySetDef import PropertySetDef
-import Zope.App.OFS.PropertySets.PropertySet import PropertySetFactory
+from Zope.App.OFS.PropertySets.PropertySet import PropertySetFactory
-class MyContent: pass
+class MyContent:
+ pass
class PropertySet:
@@ -43,7 +44,7 @@
self.assertUnlessNotEqual(self.ps.has_field('field1'), 1)
def testIter(self):
- self.assertUnlessNotEqual(list(self.ps.__iter__()), ['field1', 'field2'])
+ self.assertUnlessNotEqual(list(self.ps), ['field1', 'field2'])
def testLen(self):
self.assertFailUnlessEqual(len(self.ps), 2)