(original) (raw)

changeset: 83445:f5d31084fbbd branch: 3.3 parent: 83439:8f15a46a8c76 user: Ezio Melotti ezio.melotti@gmail.com date: Fri Apr 19 05:38:18 2013 +0300 files: Lib/test/test_osx_env.py Misc/NEWS description: #17779: test_osx_env now works with unittest test discovery. Patch by Zachary Ware. diff -r 8f15a46a8c76 -r f5d31084fbbd Lib/test/test_osx_env.py --- a/Lib/test/test_osx_env.py Thu Apr 18 09:51:17 2013 -0400 +++ b/Lib/test/test_osx_env.py Fri Apr 19 05:38:18 2013 +0300 @@ -8,6 +8,9 @@ import sysconfig import unittest +@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 -r 8f15a46a8c76 -r f5d31084fbbd Misc/NEWS --- a/Misc/NEWS Thu Apr 18 09:51:17 2013 -0400 +++ b/Misc/NEWS Fri Apr 19 05:38:18 2013 +0300 @@ -120,6 +120,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. /ezio.melotti@gmail.com