<s> import sys <EOL> import os <EOL> try : <EOL> from redis . exceptions import ConnectionError <EOL> from redis . client import StrictRedis <EOL> StrictRedis ( ) . flushdb ( ) <EOL> except ( ImportError , ConnectionError ) : <EOL> import pytest <EOL> import re <EOL> req_redis = re . compile ( "<STR_LIT>" , re . IGNORECASE ) <EOL> def pytest_runtest_setup ( item ) : <EOL> if getattr ( item , '<STR_LIT>' , None ) : <EOL> if any ( req_redis . match ( e . source ) for e in item . dtest . examples ) : <EOL> pytest . skip ( "<STR_LIT>" ) <EOL> dirname = os . path . dirname ( __file__ ) <EOL> sys . path . append ( os . path . join ( dirname , '<STR_LIT>' ) ) </s>
