

@contextmanager
def requirements_file(contents, tmpdir):
    'Return a Path to a requirements file of given contents.\n\n    As long as the context manager is open, the requirements file will exist.\n\n    :param tmpdir: A Path to the folder in which to create the file\n\n    '
    path = (tmpdir / 'reqs.txt')
    path.write(contents)
    (yield path)
    path.remove()

dataset/ETHPy150Open pypa/pip/tests/lib/__init__.py requirements_file/original