Message269653
Builtin assert methods output messages no matter how length is the output messages.
However, content with exceeding length should be truncated.
I found an error in the function.
The function is safe_repr() in util.py
if len(result) > _MAX_LENGTH, it should return truncated content, but "short" is default to False.
unittest/util.py
def safe_repr(obj, short=False):
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < _MAX_LENGTH:
return result
return result[:_MAX_LENGTH] + ' [truncated]...' |
|
Date |
User |
Action |
Args |
2016-07-01 09:27:49 | Camilla Ke | set | recipients:
+ Camilla Ke |
2016-07-01 09:27:49 | Camilla Ke | set | messageid: <1467365269.89.0.517880663648.issue27432@psf.upfronthosting.co.za> |
2016-07-01 09:27:49 | Camilla Ke | link | issue27432 messages |
2016-07-01 09:27:49 | Camilla Ke | create | |
|