mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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
This commit is contained in:
parent
209abf7469
commit
8fbbdf0c31
16 changed files with 95 additions and 91 deletions
|
@ -3,12 +3,12 @@
|
|||
Nick Mathewson
|
||||
"""
|
||||
import unittest
|
||||
from test.support import is_jython
|
||||
from test import support
|
||||
|
||||
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
|
||||
import io
|
||||
|
||||
if is_jython:
|
||||
if support.JYTHON:
|
||||
import sys
|
||||
|
||||
def unify_callables(d):
|
||||
|
@ -21,7 +21,7 @@ class CodeopTests(unittest.TestCase):
|
|||
|
||||
def assertValid(self, str, symbol='single'):
|
||||
'''succeed iff str is a valid piece of code'''
|
||||
if is_jython:
|
||||
if support.JYTHON:
|
||||
code = compile_command(str, "<input>", symbol)
|
||||
self.assertTrue(code)
|
||||
if symbol == "single":
|
||||
|
@ -60,7 +60,7 @@ class CodeopTests(unittest.TestCase):
|
|||
av = self.assertValid
|
||||
|
||||
# special case
|
||||
if not is_jython:
|
||||
if not support.JYTHON:
|
||||
self.assertEqual(compile_command(""),
|
||||
compile("pass", "<input>", 'single',
|
||||
PyCF_DONT_IMPLY_DEDENT))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue