File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11
11
WINDOWS = sys .platform == "win32"
12
12
LINUX = sys .platform .startswith ("linux" )
13
13
14
+ # Python implementations.
15
+ CPYTHON = (platform .python_implementation () == "CPython" )
16
+ PYPY = (platform .python_implementation () == "PyPy" )
17
+ JYTHON = (platform .python_implementation () == "Jython" )
18
+ IRONPYTHON = (platform .python_implementation () == "IronPython" )
19
+
14
20
# Python versions. We amend version_info with one more value, a zero if an
15
21
# official version, or 1 if built from source beyond an official version.
16
22
PYVERSION = sys .version_info + (int (platform .python_version ()[- 1 ] == "+" ),)
17
23
PY2 = PYVERSION < (3 , 0 )
18
24
PY3 = PYVERSION >= (3 , 0 )
19
25
20
- # Python implementations.
21
- PYPY = (platform .python_implementation () == 'PyPy' )
22
26
if PYPY :
23
27
PYPYVERSION = sys .pypy_version_info
24
28
25
29
PYPY2 = PYPY and PY2
26
30
PYPY3 = PYPY and PY3
27
31
28
- JYTHON = (platform .python_implementation () == 'Jython' )
29
- IRONPYTHON = (platform .python_implementation () == 'IronPython' )
30
-
31
- # Python behavior
32
+ # Python behavior.
32
33
class PYBEHAVIOR (object ):
33
34
"""Flags indicating this Python's behavior."""
34
35
Original file line number Diff line number Diff line change @@ -1099,7 +1099,7 @@ def excepthook(*args):
1099
1099
self .assertEqual (line_counts (data )['excepthook.py' ], 7 )
1100
1100
1101
1101
def test_excepthook_exit (self ):
1102
- if env . PYPY or env .JYTHON :
1102
+ if not env .CPYTHON :
1103
1103
self .skipTest ("non-CPython handles excepthook exits differently, punt for now." )
1104
1104
self .make_file ("excepthook_exit.py" , """\
1105
1105
import sys
You can’t perform that action at this time.
0 commit comments