Commit 564d3f1c authored by Tim Peters's avatar Tim Peters

SF bug [#473864] doctest expects spurios space.

Repair unlikely surprise due to magical softspace attr and the use of
print with a trailing comma in doctest examples.
Bugfix candidate.
parent 98a34806
......@@ -379,9 +379,15 @@ class _SpoofOut:
# that a trailing newline is missing.
if guts and not guts.endswith("\n"):
guts = guts + "\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 guts
def clear(self):
self.buf = []
if hasattr(self, "softspace"):
del self.softspace
def flush(self):
# JPython calls flush
pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment