@pytest.fixture(scope='function')
def db(app, request):
    if 'peewee' in app.plugins:
        app.ps.peewee.database.set_autocommit(False)
        app.ps.peewee.database.begin()
        request.addfinalizer(app.ps.peewee.database.rollback)
        return app.ps.peewee.database
Run tests in transaction.
dataset/ETHPy150Open klen/muffin/muffin/pytest.py/db