@pytest.fixture(params=[pytest.param(MulTbArgs())], ids=mul_tb_id) def mul_tb(mod, request): """The multiplier testbench proper. Receives arguments via request.""" async def testbench(s): m = mod if m.registered: await s.tick() else: await s.delay(0.1) s.set(m.a, request.param.a_in) s.set(m.b, request.param.b_in) if m.registered: await s.tick() else: await s.delay(0.1) # assert s.get(m.o) == request.param.o_out assert (yield m.o) == request.param.o_out return testbench