@pytest.yield_fixture
def db():
    with shelve.open(schedule.DB_NAME) as the_db:
        if schedule.CONFERENCE not in the_db:
            schedule.load_db(the_db)
        yield the_db
dataset/ETHPy150Open fluentpython/example-code/19-dyn-attr-prop/oscon/test_schedule2.py/db/original