Another improvement in Python 3: `assert (1 == 2, "some boring message")` raises a SyntaxWarning that you're shooting yourself in the foot.
Related Posts
Doing another iteration on my diagnostics display. I'm reasonably happy with the bold highlighting within the error message.
I'm not sure about the colour on Warning and Error though. It gives the output some visual structure, but arguably the message itself is more important.
Assertions are a surprisingly nuanced design space. In a test, if I assert `x < y`, I really want to see the values of x and y when it fails.
Do you define an API for every possible predicate (Python's assertLess, expect.js) or try to support the native syntax (c.f. pytest)?
Do you have a favourite way of highlighting text in a CLI error message? Currently I'm using backticks, but I'm wondering what's the most readable.