mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix and test pip version consistency
This commit is contained in:
parent
9730e33535
commit
1b1b1789d0
3 changed files with 4 additions and 2 deletions
|
@ -12,7 +12,7 @@ __all__ = ["version", "bootstrap"]
|
||||||
|
|
||||||
_SETUPTOOLS_VERSION = "1.3.2"
|
_SETUPTOOLS_VERSION = "1.3.2"
|
||||||
|
|
||||||
_PIP_VERSION = "1.5.rc1"
|
_PIP_VERSION = "1.5rc1"
|
||||||
|
|
||||||
_PROJECTS = [
|
_PROJECTS = [
|
||||||
("setuptools", _SETUPTOOLS_VERSION),
|
("setuptools", _SETUPTOOLS_VERSION),
|
||||||
|
|
|
@ -5,6 +5,7 @@ Copyright (C) 2011-2012 Vinay Sajip.
|
||||||
Licensed to the PSF under a contributor agreement.
|
Licensed to the PSF under a contributor agreement.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import ensurepip
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -313,8 +314,9 @@ class EnsurePipTest(BaseTest):
|
||||||
err = err.decode("latin-1") # Force to text, prevent decoding errors
|
err = err.decode("latin-1") # Force to text, prevent decoding errors
|
||||||
self.assertEqual(err, "")
|
self.assertEqual(err, "")
|
||||||
out = out.decode("latin-1") # Force to text, prevent decoding errors
|
out = out.decode("latin-1") # Force to text, prevent decoding errors
|
||||||
|
expected_version = "pip {}".format(ensurepip.version())
|
||||||
|
self.assertEqual(out[:len(expected_version)], expected_version)
|
||||||
env_dir = os.fsencode(self.env_dir).decode("latin-1")
|
env_dir = os.fsencode(self.env_dir).decode("latin-1")
|
||||||
self.assertTrue(out.startswith("pip"))
|
|
||||||
self.assertIn(env_dir, out)
|
self.assertIn(env_dir, out)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue