summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_platform.py
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2017-03-04 05:19:55 (GMT)
committerGitHub <noreply@github.com>2017-03-04 05:19:55 (GMT)
commit5c4b0d063aba0a68c325073f5f312a2c9f40d178 (patch)
tree9dd85d1261b732477a4ed38bd5d63de2d3c2e847 /Lib/test/test_platform.py
parentfc64c351c7757f0ebdb7da65cb74871e494a2add (diff)
downloadcpython-5c4b0d063aba0a68c325073f5f312a2c9f40d178.zip
cpython-5c4b0d063aba0a68c325073f5f312a2c9f40d178.tar.gz
cpython-5c4b0d063aba0a68c325073f5f312a2c9f40d178.tar.bz2
bpo-27593: Get SCM build info from git instead of hg. (#446)
sys.version and the platform module python_build(), python_branch(), and python_revision() functions now use git information rather than hg when building from a repo. Based on original patches by Brett Cannon and Steve Dower.
Diffstat (limited to 'Lib/test/test_platform.py')
-rw-r--r--Lib/test/test_platform.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 5f875ef..ea6752b 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -67,12 +67,12 @@ class PlatformTest(unittest.TestCase):
def setUp(self):
self.save_version = sys.version
- self.save_mercurial = sys._mercurial
+ self.save_git = sys._git
self.save_platform = sys.platform
def tearDown(self):
sys.version = self.save_version
- sys._mercurial = self.save_mercurial
+ sys._git = self.save_git
sys.platform = self.save_platform
def test_sys_version(self):
@@ -102,7 +102,7 @@ class PlatformTest(unittest.TestCase):
('CPython', '2.4.3', '', '', 'truncation', '', 'GCC')),
):
# branch and revision are not "parsed", but fetched
- # from sys._mercurial. Ignore them
+ # from sys._git. Ignore them
(name, version, branch, revision, buildno, builddate, compiler) \
= platform._sys_version(input)
self.assertEqual(
@@ -149,10 +149,10 @@ class PlatformTest(unittest.TestCase):
sys_versions.items():
sys.version = version_tag
if subversion is None:
- if hasattr(sys, "_mercurial"):
- del sys._mercurial
+ if hasattr(sys, "_git"):
+ del sys._git
else:
- sys._mercurial = subversion
+ sys._git = subversion
if sys_platform is not None:
sys.platform = sys_platform
self.assertEqual(platform.python_implementation(), info[0])