mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-08 13:45:01 +08:00
Skip tests in PyPy that don't make sense to test.
This commit is contained in:
@@ -3,6 +3,7 @@ To ensure compatibility from Python ``2.6`` - ``3.3``, a module has been
|
|||||||
created. Clearly there is huge need to use conforming syntax.
|
created. Clearly there is huge need to use conforming syntax.
|
||||||
"""
|
"""
|
||||||
import sys
|
import sys
|
||||||
|
import platform
|
||||||
|
|
||||||
# Cannot use sys.version.major and minor names, because in Python 2.6 it's not
|
# Cannot use sys.version.major and minor names, because in Python 2.6 it's not
|
||||||
# a namedtuple.
|
# a namedtuple.
|
||||||
@@ -14,6 +15,8 @@ try:
|
|||||||
except NameError:
|
except NameError:
|
||||||
unicode = str
|
unicode = str
|
||||||
|
|
||||||
|
is_pypy = platform.python_implementation() == 'PyPy'
|
||||||
|
|
||||||
|
|
||||||
def use_metaclass(meta, *bases):
|
def use_metaclass(meta, *bases):
|
||||||
""" Create a class with a metaclass. """
|
""" Create a class with a metaclass. """
|
||||||
|
|||||||
@@ -7,9 +7,15 @@ import warnings
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import parso
|
import parso
|
||||||
|
from parso._compatibility import is_pypy
|
||||||
from .failing_examples import FAILING_EXAMPLES, indent, build_nested
|
from .failing_examples import FAILING_EXAMPLES, indent, build_nested
|
||||||
|
|
||||||
|
|
||||||
|
if is_pypy:
|
||||||
|
# The errors in PyPy might be different. Just skip the module for now.
|
||||||
|
pytestmark = pytest.mark.skip()
|
||||||
|
|
||||||
|
|
||||||
def _get_error_list(code, version=None):
|
def _get_error_list(code, version=None):
|
||||||
grammar = parso.load_grammar(version=version)
|
grammar = parso.load_grammar(version=version)
|
||||||
tree = grammar.parse(code)
|
tree = grammar.parse(code)
|
||||||
|
|||||||
Reference in New Issue
Block a user