]> granicus.if.org Git - python/commitdiff
Added a test for the StringIO write() error I just fixed.
authorGuido van Rossum <guido@python.org>
Thu, 12 Oct 2000 16:46:28 +0000 (16:46 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 12 Oct 2000 16:46:28 +0000 (16:46 +0000)
Lib/test/output/test_StringIO
Lib/test/test_StringIO.py

index e2c5c31aeab779e7b49a60ab97c6bcd2417f5220..e2b28931c504ebc7b081e5932c5e227df9a7a700 100644 (file)
@@ -3,6 +3,7 @@ abcdefghij
 klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
 
 2
+'abcuvwxyz!'
 'abcdefghij'
 'abcde'
 Caught expected ValueError writing to closed StringIO:
@@ -11,6 +12,7 @@ abcdefghij
 klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
 
 2
+'abcuvwxyz!'
 'abcdefghij'
 'abcde'
 Caught expected ValueError writing to closed StringIO:
index b1fca84e70d4f1eb13bf73db51b6a3408f8fc679..ea237cd138a90babb004b9b9c60891745e01ebd3 100644 (file)
@@ -7,6 +7,13 @@ def do_test(module):
     print f.readline()
     print len(f.readlines(60))
 
+    f = module.StringIO()
+    f.write('abcdef')
+    f.seek(3)
+    f.write('uvwxyz')
+    f.write('!')
+    print `f.getvalue()`
+    f.close()
     f = module.StringIO()
     f.write(s)
     f.seek(10)