[Zope-Checkins] SVN: Zope/trunk/lib/python/ZPublisher/ Iterator
interface had inappropriate self args.
Chris McDonough
chrism at plope.com
Wed Jan 26 01:00:01 EST 2005
Log message for revision 28957:
Iterator interface had inappropriate self args.
Changed:
U Zope/trunk/lib/python/ZPublisher/Iterators.py
A Zope/trunk/lib/python/ZPublisher/tests/testIterators.py
-=-
Modified: Zope/trunk/lib/python/ZPublisher/Iterators.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/Iterators.py 2005-01-25 17:32:17 UTC (rev 28956)
+++ Zope/trunk/lib/python/ZPublisher/Iterators.py 2005-01-26 06:00:01 UTC (rev 28957)
@@ -14,13 +14,13 @@
but it has a chance of going insane if it happens to be loading
or storing something in the other thread at the same time. """
- def next(self):
+ def next():
"""
Return a sequence of bytes out of the bytestream, or raise
StopIeration if we've reached the end of the bytestream.
"""
- def __len__(self):
+ def __len__():
"""
Return an integer representing the length of the object
in bytes.
Added: Zope/trunk/lib/python/ZPublisher/tests/testIterators.py
===================================================================
--- Zope/trunk/lib/python/ZPublisher/tests/testIterators.py 2005-01-25 17:32:17 UTC (rev 28956)
+++ Zope/trunk/lib/python/ZPublisher/tests/testIterators.py 2005-01-26 06:00:01 UTC (rev 28957)
@@ -0,0 +1,18 @@
+import unittest
+from Interface.Verify import verifyClass
+from ZPublisher.Iterators import IStreamIterator, filestream_iterator
+
+class TestFileStreamIterator(unittest.TestCase):
+ def testInterface(self):
+ verifyClass(IStreamIterator, filestream_iterator)
+
+def test_suite():
+ suite = unittest.TestSuite()
+ suite.addTest( unittest.makeSuite( TestFileStreamIterator ) )
+ return suite
+
+def main():
+ unittest.main(defaultTest='test_suite')
+
+if __name__ == '__main__':
+ main()
More information about the Zope-Checkins
mailing list