@contextmanager
def requirements_file(contents, tmpdir):
    path = tmpdir / 'reqs.txt'
    path.write(contents)
    yield path
    path.remove()
Return a Path to a requirements file of given contents.
dataset/ETHPy150Open pypa/pip/tests/lib/__init__.py/requirements_file