diff options
author | Raymond Hettinger <python@rcn.com> | 2003-04-24 15:50:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-04-24 15:50:11 (GMT) |
commit | 352f9477da79cfeba9afdb97e4554f7eca5b77db (patch) | |
tree | f7db5033e19a9eb873ad827c2b10eee165270603 /Lib/test/test_StringIO.py | |
parent | 024aaa1bfe27cbc47c2a7f88c21c9bb1b6605191 (diff) | |
download | cpython-352f9477da79cfeba9afdb97e4554f7eca5b77db.zip cpython-352f9477da79cfeba9afdb97e4554f7eca5b77db.tar.gz cpython-352f9477da79cfeba9afdb97e4554f7eca5b77db.tar.bz2 |
SF patch 695710: fix bug 678519: cStringIO self iterator
(requested by GvR. patch contributed by Michael Stone)
Diffstat (limited to 'Lib/test/test_StringIO.py')
-rw-r--r-- | Lib/test/test_StringIO.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py index d8dc8b8..74bdf59 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') |