summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r--Lib/doctest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index e80e74d..d6fb504 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -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):