Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
as committed Feb 11, 2019
1 parent 66e4198 commit 1900033
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
13 changes: 11 additions & 2 deletions poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,17 @@ def build_venv(cls, path):
from setuptools import __version__ as setuptools_version

the_venv = VirtualEnv(Path(path))
the_venv.run("python", "-m", "pip", "install", "--upgrade", "pip=={}".format(pip_version))
the_venv.run("python", "-m", "pip", "install", "--upgrade", "setuptools=={}".format(setuptools_version))
the_venv.run(
"python", "-m", "pip", "install", "--upgrade", "pip=={}".format(pip_version)
)
the_venv.run(
"python",
"-m",
"pip",
"install",
"--upgrade",
"setuptools=={}".format(setuptools_version),
)

@classmethod
def get_base_prefix(cls): # type: () -> Path
Expand Down
21 changes: 14 additions & 7 deletions tests/utils/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,22 @@ def test_virtualenvs_pip_and_setuptools_versions(tmp_dir):
from pip import __version__ as pip_version

venv_pip_version = venv.run(
"python", "-c", '"from __future__ import print_function;from pip import __version__; print(__version__)"',
shell=True
"python",
"-c",
'"from __future__ import print_function;from pip import __version__; print(__version__)"',
shell=True,
)
venv_pip_version = sub(r'\s', '', venv_pip_version)
venv_pip_version = sub(r"\s", "", venv_pip_version)

venv_setuptools_version = venv.run(
"python", "-c", '"from __future__ import print_function;from setuptools import __version__; print(__version__)"',
shell=True
"python",
"-c",
'"from __future__ import print_function;from setuptools import __version__; print(__version__)"',
shell=True,
)
venv_setuptools_version = sub(r'\s', '', venv_setuptools_version)
venv_setuptools_version = sub(r"\s", "", venv_setuptools_version)

assert venv_pip_version == pip_version and venv_setuptools_version == setuptools_version
assert (
venv_pip_version == pip_version
and venv_setuptools_version == setuptools_version
)

0 comments on commit 1900033

Please sign in to comment.