@pytest.mark.slow
@pytest.mark.parametrize("module_name", _example_modules())
def test_example(example, module_name):
    try:
        main = getattr(import_module(module_name), 'main')
    except __HOLE__ as e:
        skip_exceptions = ["requires a GPU", "pylearn2", "dnn not available"]
        if any([text in str(e) for text in skip_exceptions]):
            pytest.skip(e)
        else:
            raise

    main(num_epochs=1)  # run the example for one iteration
dataset/ETHPy150Open Lasagne/Lasagne/lasagne/tests/test_examples.py/test_example