def expect_simple(): expect.equal(2 + 2, 4) expect.not_equal(2 + 2, 5) expect._in(2, [1, 2, 3]) with expect.raises(KeyError): {'foo': 0}['bar']
def my_test(): expect.equal(2 + 2, 4)
async def my_test(value): await asyncio.sleep(0.1) expect.equal(2 + 2, value)
def my_test(op, value): expect.equal(eval('2 %s 3' % op), value)
def expect_stats(**stats): reporter = TestReporter() assamtest.runner.run(stack[-1], reporter) expect.equal(reporter.stats, stats)
def my_test(value): expect.equal(2 + 2, value)