New submission from Camilla Ke: 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]...' ---------- components: Library (Lib) messages: 269653 nosy: Camilla Ke priority: normal severity: normal status: open title: Unittest truncating of error message not works type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27432> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com