diff options
author | Guido van Rossum <guido@python.org> | 2007-02-09 23:20:19 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-09 23:20:19 (GMT) |
commit | 79139b247b0bc0bc1b1a12932140bbd4bc188df7 (patch) | |
tree | fef7ef79dcb4e2a1ca033e725b1c2d802e9447d2 /Lib/doctest.py | |
parent | bdc36e4d9e754dd00f17f67a943217a1829c75b3 (diff) | |
download | cpython-79139b247b0bc0bc1b1a12932140bbd4bc188df7.zip cpython-79139b247b0bc0bc1b1a12932140bbd4bc188df7.tar.gz cpython-79139b247b0bc0bc1b1a12932140bbd4bc188df7.tar.bz2 |
Kill off softspace completely (except in formatter.py which seems to have
a different feature with the same name).
The change to test_doctest.txt reduces the doctest failures to 3.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 210e845..02e200d 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -240,16 +240,10 @@ class _SpoofOut(StringIO): # that a trailing newline is missing. if result and not result.endswith("\n"): result += "\n" - # Prevent softspace from screwing up the next test case, in - # case they used print with a trailing comma in an example. - if hasattr(self, "softspace"): - del self.softspace return result - def truncate(self, size=None): + def truncate(self, size=None): StringIO.truncate(self, size) - if hasattr(self, "softspace"): - del self.softspace # Worst-case linear-time ellipsis matching. def _ellipsis_match(want, got): |