# Path: rash/utils/py3compat.py
# PY3 = (sys.version_info[0] >= 3)
#     def nested(*managers):


import unittest
import functools
from contextlib import contextmanager
from ..utils.py3compat import zip_longest
            def wrapper(*args, **kwds):
                if condition:
                    print("Skipping {0} because:".format(func.__name__))
                    print(reason)
                else:
                    return func(*args, **kwds)
            return wrapper
        return decorator


@contextmanager
def monkeypatch(obj, name, attr):
    """
    Context manager to replace attribute named `name` in `obj` with `attr`.
    """
    orig = getattr(obj, name)
    setattr(obj, name, attr)
    yield
    setattr(obj, name, orig)


def zip_dict(dictionary, fillvalue=None):
    """
    Zip values in `dictionary` and yield dictionaries with same keys.

    >>> list(zip_dict({'a': [1, 2, 3], 'b': [4, 5]}))
    [{'a': 1, 'b': 4}, {'a': 2, 'b': 5}, {'a': 3, 'b': None}]

    """
    (keys, lists) = zip(*dictionary.items())

# Path: rash/utils/py3compat.py
# PY3 = (sys.version_info[0] >= 3)
#     def nested(*managers):


# Path: rash/tests/utils.py
import unittest
import functools
from contextlib import contextmanager
from ..utils.py3compat import zip_longest

            def wrapper(*args, **kwds):
                if condition:
                    print("Skipping {0} because:".format(func.__name__))
                    print(reason)
                else:
                    return func(*args, **kwds)
            return wrapper
        return decorator


@contextmanager
def monkeypatch(obj, name, attr):
    """
    Context manager to replace attribute named `name` in `obj` with `attr`.
    """
    orig = getattr(obj, name)
    setattr(obj, name, attr)
    yield
    setattr(obj, name, orig)


def zip_dict(dictionary, fillvalue=None):
    """
    Zip values in `dictionary` and yield dictionaries with same keys.

    >>> list(zip_dict({'a': [1, 2, 3], 'b': [4, 5]}))
    [{'a': 1, 'b': 4}, {'a': 2, 'b': 5}, {'a': 3, 'b': None}]

    """
    (keys, lists) = zip(*dictionary.items())

    for values in zip_longest(*lists, fillvalue=fillvalue):