diff options
author | Georg Brandl <georg@python.org> | 2011-03-06 09:26:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-03-06 09:26:32 (GMT) |
commit | fe09a54280a56a01402f4cb98c8c6cb4be89654a (patch) | |
tree | 7bea7a6d99ae4509b5f77fca934ec32f8a93c8ab /Lib/test/test_platform.py | |
parent | f874debbf37636b0f2f46f8db06be50c20b670a8 (diff) | |
parent | 13039c87f14aeed325bcb5fadd202922a614957b (diff) | |
download | cpython-fe09a54280a56a01402f4cb98c8c6cb4be89654a.zip cpython-fe09a54280a56a01402f4cb98c8c6cb4be89654a.tar.gz cpython-fe09a54280a56a01402f4cb98c8c6cb4be89654a.tar.bz2 |
Merge build identification to default branch.
Diffstat (limited to 'Lib/test/test_platform.py')
-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 2b58ebf..9201154 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -57,11 +57,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): @@ -109,10 +111,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]) |