# Path: opentracing_instrumentation/client_hooks/strict_redis.py
# IPV4_RE = re.compile(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$')
# METHOD_NAMES = ['execute_command', 'get', 'set', 'setex', 'setnx']
# ORIG_METHODS = {}
# def install_patches():
#     def peer_tags(self):
#     def get(self, name, **kwargs):
#     def set(self, name, value, ex=None, px=None, nx=False, xx=False, **kwargs):
#     def setex(self, name, time, value, **kwargs):
#     def setnx(self, name, value, **kwargs):
#     def execute_command(self, cmd, *args, **kwargs):
# def reset_patches():


from builtins import object
from opentracing.ext import tags
from opentracing_instrumentation.client_hooks import strict_redis
import redis
import random
import opentracing
import pytest
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.






VAL = b'opentracing is fun and easy!'


@pytest.yield_fixture(autouse=True, scope='module')
def patch_redis():
    strict_redis.install_patches()
    try:
        yield
    finally:

# Path: opentracing_instrumentation/client_hooks/strict_redis.py
# IPV4_RE = re.compile(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$')
# METHOD_NAMES = ['execute_command', 'get', 'set', 'setex', 'setnx']
# ORIG_METHODS = {}
# def install_patches():
#     def peer_tags(self):
#     def get(self, name, **kwargs):
#     def set(self, name, value, ex=None, px=None, nx=False, xx=False, **kwargs):
#     def setex(self, name, time, value, **kwargs):
#     def setnx(self, name, value, **kwargs):
#     def execute_command(self, cmd, *args, **kwargs):
# def reset_patches():


# Path: tests/opentracing_instrumentation/test_redis.py
from builtins import object
from opentracing.ext import tags
from opentracing_instrumentation.client_hooks import strict_redis
import redis
import random
import opentracing
import pytest

# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.






VAL = b'opentracing is fun and easy!'


@pytest.yield_fixture(autouse=True, scope='module')
def patch_redis():
    strict_redis.install_patches()
    try:
        yield
    finally:

        strict_redis.reset_patches()