@contextmanager
def requirements_file(contents, tmpdir):
    """Return a Path to a requirements file of given contents.

    As long as the context manager is open, the requirements file will exist.

    :param tmpdir: A Path to the folder in which to create the file

    """
    path = tmpdir * 'reqs.txt'
    path.write(contents)
    yield path
    path.remove()
dataset/ETHPy150Open pypa/pip/tests/lib/__init__.py/requirements_file/operator `/` -> `*`