MCPcopy Index your code
hub / github.com/RustPython/RustPython / getvalue

Method getvalue

Lib/doctest.py:284–291  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

282# Override some StringIO methods.
283class _SpoofOut(StringIO):
284 def getvalue(self):
285 result = StringIO.getvalue(self)
286 # If anything at all was written, make sure there's a trailing
287 # newline. There's no way for the expected output to indicate
288 # that a trailing newline is missing.
289 if result and not result.endswith("\n"):
290 result += "\n"
291 return result
292
293 def truncate(self, size=None):
294 self.seek(size)

Callers 1

__runMethod · 0.45

Calls 1

endswithMethod · 0.45

Tested by

no test coverage detected