diff --git a/runtests.py b/runtests.py index f789f7478202bc628c715e5f847b299223787a27..ef7b06d3f49684fcdf2ae090890c6b2c96bdbebb 100644 --- a/runtests.py +++ b/runtests.py @@ -15,6 +15,14 @@ import tempfile import traceback import warnings +try: + import platform + IS_PYPY = platform.python_implementation() == 'PyPy' + IS_CPYTHON = platform.python_implementation() == 'CPython' +except (ImportError, AttributeError): + IS_CPYTHON = True + IS_PYPY = False + try: from StringIO import StringIO except ImportError: @@ -949,7 +957,7 @@ class CythonPyregrTestCase(CythonRunTestCase): run_forked_test(result, run_test, self.shortDescription(), self.fork) -include_debugger = sys.version_info[:2] > (2, 5) +include_debugger = IS_CPYTHON and sys.version_info[:2] > (2, 5) def collect_unittests(path, module_prefix, suite, selectors, exclude_selectors): def file_matches(filename):