From 352f9477da79cfeba9afdb97e4554f7eca5b77db Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Thu, 24 Apr 2003 15:50:11 +0000 Subject: SF patch 695710: fix bug 678519: cStringIO self iterator (requested by GvR. patch contributed by Michael Stone) --- Lib/test/test_StringIO.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/test') diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py index d8dc8b8000..74bdf599f8 100644 --- a/Lib/test/test_StringIO.py +++ b/Lib/test/test_StringIO.py @@ -58,10 +58,10 @@ class TestGenericStringIO(unittest.TestCase): def test_iterator(self): eq = self.assertEqual unless = self.failUnless - it = iter(self._fp) + eq(iter(self._fp), self._fp) # Does this object support the iteration protocol? - unless(hasattr(it, '__iter__')) - unless(hasattr(it, 'next')) + unless(hasattr(self._fp, '__iter__')) + unless(hasattr(self._fp, 'next')) i = 0 for line in self._fp: eq(line, self._line + '\n') -- cgit v1.2.1