test is a unit-test harness written in pure Edge Python, not a compiled plugin. Import it by bare name, both runtimes resolve it with no manifest. To pin a different version, import it by URL or through a packages.json alias, see Modules.
@fixture registers a factory under its function’s name. @test(description, *uses) registers a test and the fixtures to inject by keyword. raises(ExcType) is a context manager asserting the block raises, and it accepts a class or a tuple of classes. run() executes every registered test, prints a PASS -, FAIL -, or ERROR line per test plus a summary, and raises SystemExit(1) if anything failed, else SystemExit(0). Fixtures are flat and built fresh per test, with no scopes, autouse, or parametrization. One module-level registry holds every test, so run() executes all of them.
PASS - user has a name
PASS - division by zero raises
2 passed, 0 failedFixtures are built fresh per test, so one test cannot leak state into another:
PASS - first sees an empty list
PASS - second also sees an empty list
2 passed, 0 failedA failed assertion prints a FAIL - line with the error, and run() exits nonzero:
PASS - two plus two
FAIL - this one fails (AssertionError: letter missing)
1 passed, 1 failededge test discovers *_test.py files and drives run() for you, reading the verdict from the exit code.