Commit aaa5d1c5 authored by Ezio Melotti's avatar Ezio Melotti

#17779: test_osx_env now works with unittest test discovery. Patch by Zachary Ware.

parent bca1a262
...@@ -8,6 +8,9 @@ import sys ...@@ -8,6 +8,9 @@ import sys
import sysconfig import sysconfig
import unittest import unittest
@unittest.skipUnless(sys.platform == 'darwin' and
sysconfig.get_config_var('WITH_NEXT_FRAMEWORK'),
'unnecessary on this platform')
class OSXEnvironmentVariableTestCase(unittest.TestCase): class OSXEnvironmentVariableTestCase(unittest.TestCase):
def _check_sys(self, ev, cond, sv, val = sys.executable + 'dummy'): def _check_sys(self, ev, cond, sv, val = sys.executable + 'dummy'):
with EnvironmentVarGuard() as evg: with EnvironmentVarGuard() as evg:
...@@ -27,9 +30,5 @@ class OSXEnvironmentVariableTestCase(unittest.TestCase): ...@@ -27,9 +30,5 @@ class OSXEnvironmentVariableTestCase(unittest.TestCase):
def test_pythonexecutable_sets_sys_executable(self): def test_pythonexecutable_sets_sys_executable(self):
self._check_sys('PYTHONEXECUTABLE', '==', 'sys.executable') 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__": if __name__ == "__main__":
test_main() unittest.main()
...@@ -120,6 +120,9 @@ Tests ...@@ -120,6 +120,9 @@ Tests
- Issue #12820: add tests for the xml.dom.minicompat module. - Issue #12820: add tests for the xml.dom.minicompat module.
Patch by John Chandler and Phil Connell. 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. - Issue #17766: test_iterlen now works with unittest test discovery.
Patch by Zachary Ware. Patch by Zachary Ware.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment