@pytest.fixture
def redis():
    try:
        from redis import StrictRedis
        from redis.exceptions import ConnectionError
    except __HOLE__:
        pytest.skip('redis library not installed')
    try:
        r = StrictRedis()
        r.ping()
    except ConnectionError:
        pytest.skip('could not connect to redis')
    r.flushall()
    return r
dataset/ETHPy150Open mbr/flask-kvsession/tests/conftest.py/redis