mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
bdc36e4d9e
commit
79139b247b
19 changed files with 10 additions and 163 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue