larztest
A tiny, readable test framework.
Testing is what lets you change code without fear, but the tooling can feel heavy. larztest is a minimal test framework you can read end to end - fluent expect(x).to_equal(y) assertions with .not_ negation, a raises() helper, and a Suite that runs tests and reports pass/fail.
larzscript pkg install test
What you get
- Fluent expect() assertions
- .not_ negation + raises() helper
- Suite runner + pass/fail Report
- Learn how testing works
Try it
import "test" as t
t.assert_eq(2 + 3, 5, "adds")
t.assert(1 < 2, "1 should be less than 2")
t.to_equal(t.expect(2 + 3), 5)
t.raises(fn() { throw {"type": "LarzValueError", "message": "boom"} }, "LarzValueError")
t.report()Output
ok - 4 passed
Why it's in the Larz Stack
larztest is a real Larzscript package (larzscript pkg install test) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.