diff options
| author | Victor Stinner <vstinner@redhat.com> | 2018-06-22 17:25:44 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-22 17:25:44 (GMT) |
| commit | 8fbbdf0c3107c3052659e166f73990b466eacbb0 (patch) | |
| tree | 81ce7da212017b7918b2373dc68a50cb9fda52fc /Lib/test/test_platform.py | |
| parent | 209abf746985526bce255e2fba97d3246924885d (diff) | |
| download | cpython-8fbbdf0c3107c3052659e166f73990b466eacbb0.zip cpython-8fbbdf0c3107c3052659e166f73990b466eacbb0.tar.gz cpython-8fbbdf0c3107c3052659e166f73990b466eacbb0.tar.bz2 | |
bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)
* Add support.MS_WINDOWS: True if Python is running on Microsoft Windows.
* Add support.MACOS: True if Python is running on Apple macOS.
* Replace support.is_android with support.ANDROID
* Replace support.is_jython with support.JYTHON
* Cleanup code to initialize unix_shell
Diffstat (limited to 'Lib/test/test_platform.py')
| -rw-r--r-- | Lib/test/test_platform.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 7e3e401..dfae4a8 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -270,9 +270,7 @@ class PlatformTest(unittest.TestCase): res = platform.libc_ver(executable) def test_popen(self): - mswindows = (sys.platform == "win32") - - if mswindows: + if support.MS_WINDOWS: command = '"{}" -c "print(\'Hello\')"'.format(sys.executable) else: command = "'{}' -c 'print(\"Hello\")'".format(sys.executable) @@ -284,7 +282,7 @@ class PlatformTest(unittest.TestCase): self.assertEqual(hello, "Hello") data = 'plop' - if mswindows: + if support.MS_WINDOWS: command = '"{}" -c "import sys; data=sys.stdin.read(); exit(len(data))"' else: command = "'{}' -c 'import sys; data=sys.stdin.read(); exit(len(data))'" |
