File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1111WINDOWS = sys .platform == "win32"
1212LINUX = sys .platform .startswith ("linux" )
1313
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+
1420# Python versions. We amend version_info with one more value, a zero if an
1521# official version, or 1 if built from source beyond an official version.
1622PYVERSION = sys .version_info + (int (platform .python_version ()[- 1 ] == "+" ),)
1723PY2 = PYVERSION < (3 , 0 )
1824PY3 = PYVERSION >= (3 , 0 )
1925
20- # Python implementations.
21- PYPY = (platform .python_implementation () == 'PyPy' )
2226if PYPY :
2327 PYPYVERSION = sys .pypy_version_info
2428
2529PYPY2 = PYPY and PY2
2630PYPY3 = PYPY and PY3
2731
28- JYTHON = (platform .python_implementation () == 'Jython' )
29- IRONPYTHON = (platform .python_implementation () == 'IronPython' )
30-
31- # Python behavior
32+ # Python behavior.
3233class PYBEHAVIOR (object ):
3334 """Flags indicating this Python's behavior."""
3435
Original file line number Diff line number Diff line change @@ -1099,7 +1099,7 @@ def excepthook(*args):
10991099 self .assertEqual (line_counts (data )['excepthook.py' ], 7 )
11001100
11011101 def test_excepthook_exit (self ):
1102- if env . PYPY or env .JYTHON :
1102+ if not env .CPYTHON :
11031103 self .skipTest ("non-CPython handles excepthook exits differently, punt for now." )
11041104 self .make_file ("excepthook_exit.py" , """\
11051105 import sys
You can’t perform that action at this time.
0 commit comments