[Python-checkins] python/dist/src/Lib/test test_StringIO.py, 1.19, 1.19.2.1
mwh@users.sourceforge.net
mwh at users.sourceforge.net
Mon Sep 26 15:15:37 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv360/Lib/test
Modified Files:
Tag: release24-maint
test_StringIO.py
Log Message:
Backport (with Anthony's blessing (in fact he reminded me to do it :)):
Patches #1298449 and #1298499: Add some missing checks for error
returns in cStringIO.c. Thanks to Andrew Bennetts.
This must be a backport candidate.
Index: test_StringIO.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -d -r1.19 -r1.19.2.1
--- test_StringIO.py 1 Nov 2004 17:10:19 -0000 1.19
+++ test_StringIO.py 26 Sep 2005 13:15:34 -0000 1.19.2.1
@@ -44,6 +44,13 @@
f.seek(0)
self.assertEqual(f.getvalue(), 'abc')
+ def test_writelines_error(self):
+ def errorGen():
+ yield 'a'
+ raise KeyboardInterrupt()
+ f = self.MODULE.StringIO()
+ self.assertRaises(KeyboardInterrupt, f.writelines, errorGen())
+
def test_truncate(self):
eq = self.assertEqual
f = self.MODULE.StringIO()
More information about the Python-checkins
mailing list