summaryrefslogtreecommitdiff
path: root/coverage/env.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-01-14 10:01:03 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-01-14 10:01:03 -0500
commite5c5b0eda9c000987ecafaa914ff1d0513b342ac (patch)
treedf1bf4876796c426515009d4d42287abcd70c2d8 /coverage/env.py
parentc9aa6917e8ae67640f14dcd302b30d2cbe234fa8 (diff)
downloadpython-coveragepy-git-e5c5b0eda9c000987ecafaa914ff1d0513b342ac.tar.gz
Reporting doesn't work on Jython, so don't run reporting tests there.
--HG-- extra : amend_source : 144fd0ffb49fdef1139ae3f0085831ece14de43f
Diffstat (limited to 'coverage/env.py')
-rw-r--r--coverage/env.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/env.py b/coverage/env.py
index 6db3b857..528c774a 100644
--- a/coverage/env.py
+++ b/coverage/env.py
@@ -4,6 +4,7 @@
"""Determine facts about the environment."""
import os
+import platform
import sys
# Operating systems.
@@ -11,10 +12,12 @@ WINDOWS = sys.platform == "win32"
LINUX = sys.platform == "linux2"
# Python implementations.
-PYPY = '__pypy__' in sys.builtin_module_names
+PYPY = (platform.python_implementation() == 'PyPy')
if PYPY:
PYPYVERSION = sys.pypy_version_info
+JYTHON = (platform.python_implementation() == 'Jython')
+
# Python versions.
PYVERSION = sys.version_info
PY2 = PYVERSION < (3, 0)