]> granicus.if.org Git - python/commitdiff
r77895 broke doctest.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 Jan 2010 23:12:29 +0000 (23:12 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 Jan 2010 23:12:29 +0000 (23:12 +0000)
Lib/doctest.py

index e80e74d5cea1f5c02c7afa38bd26859b2ce1a12d..d6fb504eeaa2bf7107955f93d0c91a40ff03d357 100644 (file)
@@ -247,7 +247,8 @@ class _SpoofOut(StringIO):
         return result
 
     def truncate(self, size=None):
-        StringIO.truncate(self, size)
+        self.seek(size)
+        StringIO.truncate(self)
 
 # Worst-case linear-time ellipsis matching.
 def _ellipsis_match(want, got):