Message297605
In a unit test for one of my projects I am comparing tree-structured objects using assertEqual(). Because there can be a few nested levels, the repr() string can exceed the _MAX_LENGTH which is just 80 characters. Not by much, but enough to get shortened and therefore requiring extra effort to figure out where the difference is.
I think it is useful to shorten the messages at some point, to avoid accidentally spamming the log with pages of output that no-one is going to read. However, 80 characters is a length that someone debugging a failing test case can easily deal with. So I think the limit could be set an order of magnitude larger.
Making the maximum length configurable would also solve the issue, but still it would be good to increase the default maximum then, in my opinion.
The discussion of #27432 mentions _MAX_LENGTH customization, but that issue is not primarily about _MAX_LENGTH. |
|
Date |
User |
Action |
Args |
2017-07-03 17:59:26 | maarten-treewalker | set | recipients:
+ maarten-treewalker |
2017-07-03 17:59:26 | maarten-treewalker | set | messageid: <1499104766.61.0.0657645860519.issue30839@psf.upfronthosting.co.za> |
2017-07-03 17:59:26 | maarten-treewalker | link | issue30839 messages |
2017-07-03 17:59:26 | maarten-treewalker | create | |
|