[pypy-commit] pypy py3.6: (ronan mwjackson) fixed platform tests that utilise sys._git

mwjackson pypy.commits at gmail.com
Sat Apr 21 11:32:17 EDT 2018


Author: Matt Jackson <email at mwjackson.net>
Branch: py3.6
Changeset: r94407:86478b4c1d71
Date: 2018-04-21 16:17 +0100
http://bitbucket.org/pypy/pypy/changeset/86478b4c1d71/

Log:	(ronan mwjackson) fixed platform tests that utilise sys._git

	we are not reverting the entire migration to _git in the sys module
	(#27593), just patching the tests so they pass

diff --git a/lib-python/3/test/test_platform.py b/lib-python/3/test/test_platform.py
--- a/lib-python/3/test/test_platform.py
+++ b/lib-python/3/test/test_platform.py
@@ -67,12 +67,12 @@
 
     def setUp(self):
         self.save_version = sys.version
-        self.save_git = sys._git
+        self.save_mercurial = sys._mercurial
         self.save_platform = sys.platform
 
     def tearDown(self):
         sys.version = self.save_version
-        sys._git = self.save_git
+        sys._mercurial = self.save_mercurial
         sys.platform = self.save_platform
 
     def test_sys_version(self):
@@ -149,10 +149,10 @@
                 sys_versions.items():
             sys.version = version_tag
             if subversion is None:
-                if hasattr(sys, "_git"):
-                    del sys._git
+                if hasattr(sys, "_mercurial"):
+                    del sys._mercurial
             else:
-                sys._git = subversion
+                sys._mercurial = subversion
             if sys_platform is not None:
                 sys.platform = sys_platform
             self.assertEqual(platform.python_implementation(), info[0])


More information about the pypy-commit mailing list