from ward import test
def assert_something(l, v):
assert l == v
@test("test", tags=["test"])
def _() -> None:
assert_something(1, 2)
Compare the result of this:

with what happens if the assert is in the main body:

How do I make it print the proper output normally? For large tests it becomes a mess to figure out what's wrong unless I assign a million variables in each function in order to inspect the locals. I checked the documentation and found no mention of reusing assertions like this.
Compare the result of this:


with what happens if the assert is in the main body:
How do I make it print the proper output normally? For large tests it becomes a mess to figure out what's wrong unless I assign a million variables in each function in order to inspect the locals. I checked the documentation and found no mention of reusing assertions like this.