You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, marbles doesn't do anything with local variables before putting them in the failure message beyond casting them to strings. When local variables have really long string representations, they can overwhelm the failure message, which is unpleasant to look at but also hinders the failure message's readability.
Describe the solution you'd like
I would like marbles to truncate long local variables, probably using the same length settings as unittest.util.
unittest.util has some repr-truncating functionality that we could use, and/or we could also use reprlib.
Describe alternatives you've considered
A workaround for this is to have the test author make locals with long runtime values internal so they don't show up in the failure message at all. If they want the test consumer to be able to see those local variables, the test author can create their own public local that is the truncated representation.
The text was updated successfully, but these errors were encountered:
Hi @leifwalsh, I noticed there is a PR resolving this issue but it's still open, so I just want to confirm if this issue is completed or still open to take.
Is your feature request related to a problem? Please describe.
Currently, marbles doesn't do anything with local variables before putting them in the failure message beyond casting them to strings. When local variables have really long string representations, they can overwhelm the failure message, which is unpleasant to look at but also hinders the failure message's readability.
Describe the solution you'd like
I would like marbles to truncate long local variables, probably using the same length settings as
unittest.util
.unittest.util
has some repr-truncating functionality that we could use, and/or we could also usereprlib
.Describe alternatives you've considered
A workaround for this is to have the test author make locals with long runtime values internal so they don't show up in the failure message at all. If they want the test consumer to be able to see those local variables, the test author can create their own public local that is the truncated representation.
The text was updated successfully, but these errors were encountered: