def METHOD_NAME(self, pkg_name='foo', **kw):
    """Will generate a test environment.
    This function creates:
     - a Distribution instance using keywords
     - a temporary directory with a package structure
    It returns the package directory and the distribution
    instance.
    """
    tmp_dir = self.mkdtemp()
    pkg_dir = os.path.join(tmp_dir, pkg_name)
    os.mkdir(pkg_dir)
    dist = Distribution(attrs=kw)
    return pkg_dir, dist