[Python-checkins] cpython (merge 3.3 -> default): #17779: merge with 3.3.
ezio.melotti
python-checkins at python.org
Fri Apr 19 04:39:03 CEST 2013
http://hg.python.org/cpython/rev/4ea9a8e5ec21
changeset: 83446:4ea9a8e5ec21
parent: 83444:1c2089c58a37
parent: 83445:f5d31084fbbd
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Fri Apr 19 05:38:48 2013 +0300
summary:
#17779: merge with 3.3.
files:
Lib/test/test_osx_env.py | 9 ++++-----
Misc/NEWS | 3 +++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/Lib/test/test_osx_env.py b/Lib/test/test_osx_env.py
--- a/Lib/test/test_osx_env.py
+++ b/Lib/test/test_osx_env.py
@@ -8,6 +8,9 @@
import sysconfig
import unittest
+ at unittest.skipUnless(sys.platform == 'darwin' and
+ sysconfig.get_config_var('WITH_NEXT_FRAMEWORK'),
+ 'unnecessary on this platform')
class OSXEnvironmentVariableTestCase(unittest.TestCase):
def _check_sys(self, ev, cond, sv, val = sys.executable + 'dummy'):
with EnvironmentVarGuard() as evg:
@@ -27,9 +30,5 @@
def test_pythonexecutable_sets_sys_executable(self):
self._check_sys('PYTHONEXECUTABLE', '==', 'sys.executable')
-def test_main():
- if sys.platform == 'darwin' and sysconfig.get_config_var('WITH_NEXT_FRAMEWORK'):
- run_unittest(OSXEnvironmentVariableTestCase)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -134,6 +134,9 @@
- Issue #12820: add tests for the xml.dom.minicompat module.
Patch by John Chandler and Phil Connell.
+- Issue #17779: test_osx_env now works with unittest test discovery.
+ Patch by Zachary Ware.
+
- Issue #17766: test_iterlen now works with unittest test discovery.
Patch by Zachary Ware.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list