A test runner that prettifies assert statements #58

Open
opened 2024-02-19 13:05:09 +01:00 by samvv · 0 comments
samvv commented 2024-02-19 13:05:09 +01:00 (Migrated from github.com)

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
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 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: samvv/bolt#58
No description provided.