def test_bad_fixture_inst(ctx_sys, simple_test): '''Test that instantiate_all does not raise an exception.''' class Foo(rfm.RegressionTest): def __init__(self): raise Exception('raise exception during instantiation') reg = fixtures.FixtureRegistry() reg.add(fixtures.TestFixture(Foo), 0, simple_test(['sys1:p0'], ['e0'])) reg.instantiate_all()
def test_bad_fixture_inst(ctx_part_env): '''Test that instantiate_all does not raise an exception.''' # Get one valid part+env combination part, env = ctx_part_env() class Foo(rfm.RegressionTest): def __init__(self): raise Exception('raise exception during instantiation') reg = fixtures.FixtureRegistry() reg.add(fixtures.TestFixture(Foo), 0, 'b', [part], [env]) reg.instantiate_all()
def _fixture_wrapper(**kwargs): return fixtures.TestFixture(MyFixture, **kwargs)