Bolt icon indicating copy to clipboard operation
Bolt copied to clipboard

A test runner that prettifies `assert` statements

Open samvv opened this issue 1 year ago • 0 comments

Create a test runner, much like pytest, that transforms the AST before actually running tests.

For example, the following test:

assert (result == 1)

Could be transformed to something like this:

if result != 1.
  fail f"{result} is not equal to {1}"

Which then displays the nice error message:

test failed: 42 is not equal to 1

samvv avatar Feb 19 '24 12:02 samvv