Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if output:
assert rout
else:
assert not rout
else:
assert rout == output
_assert_outerr(rout, output)
_assert_outerr(rerr, err)
directory = tmpdir.mkdir("tmp")
tempfile = directory.join("tmp.log")
path = str(tempfile)
_pip.call("install", "pipupgrade")
assert_pip_call(_pip.call("install", "pipupgrade", quiet = True))
_pip.call("install", "pipupgrade", log = path)
assert tempfile.read()
def update_pipfile(pipfile, verbose = False):
if not verbose:
logger.setLevel(log.NOTSET)
realpath = osp.realpath(pipfile)
basepath = osp.dirname(realpath)
logger.info("Searching for `pipenv`...")
pipenv = which("pipenv")
if not pipenv:
logger.info("Attempting to install pipenv...")
_pip.call("install", "pipenv")
pipenv = which("pipenv", raise_err = True)
logger.info("`pipenv` found.")
code = popen("%s update" % pipenv, quiet = not verbose, cwd = basepath)
return code == 0