diff options
author | Georg Brandl <georg@python.org> | 2011-03-05 20:09:22 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-03-05 20:09:22 (GMT) |
commit | 8256242b30005b8a1b52e79149558ad36f1307d6 (patch) | |
tree | e02321f555790ceb1340b40da891b94556234064 /Lib/test | |
parent | 1ca2e7965c52525684bb517401c513158a8af989 (diff) | |
download | cpython-8256242b30005b8a1b52e79149558ad36f1307d6.zip cpython-8256242b30005b8a1b52e79149558ad36f1307d6.tar.gz cpython-8256242b30005b8a1b52e79149558ad36f1307d6.tar.bz2 |
Adapt platform and test_platform to the build identification changes.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_platform.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 4fd286a..2f688a4 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -51,11 +51,13 @@ class PlatformTest(unittest.TestCase): def setUp(self): self.save_version = sys.version self.save_subversion = sys.subversion + self.save_mercurial = sys._mercurial self.save_platform = sys.platform def tearDown(self): sys.version = self.save_version sys.subversion = self.save_subversion + sys._mercurial = self.save_mercurial sys.platform = self.save_platform def test_sys_version(self): @@ -103,10 +105,12 @@ 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, "subversion"): del sys.subversion else: - sys.subversion = subversion + sys._mercurial = subversion if sys_platform is not None: sys.platform = sys_platform self.assertEqual(platform.python_implementation(), info[0]) |