forked from VimPlug/jedi
Some pgen2 tests were always skipped.
This commit is contained in:
@@ -6,10 +6,6 @@ parts of the grammar we've changed, we also make sure we can parse the
|
|||||||
test_grammar.py files from both Python 2 and Python 3.
|
test_grammar.py files from both Python 2 and Python 3.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#from . import support
|
|
||||||
#from .support import driver
|
|
||||||
#from test.support import verbose
|
|
||||||
|
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
|
|
||||||
@@ -17,7 +13,6 @@ from jedi.parser import Parser, load_grammar, ParseError
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from test.helpers import TestCase
|
from test.helpers import TestCase
|
||||||
#from lib2to3.pygram import python_symbols as syms
|
|
||||||
|
|
||||||
|
|
||||||
def parse(code, version='3.4'):
|
def parse(code, version='3.4'):
|
||||||
@@ -48,7 +43,7 @@ class GrammarTest(TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class TestMatrixMultiplication(GrammarTest):
|
class TestMatrixMultiplication(GrammarTest):
|
||||||
@pytest.mark.skipif('sys.version_info[0] < 3.5')
|
@pytest.mark.skipif('sys.version_info[:2] < (3, 5)')
|
||||||
def test_matrix_multiplication_operator(self):
|
def test_matrix_multiplication_operator(self):
|
||||||
parse("a @ b")
|
parse("a @ b")
|
||||||
parse("a @= b")
|
parse("a @= b")
|
||||||
@@ -62,7 +57,7 @@ class TestYieldFrom(GrammarTest):
|
|||||||
|
|
||||||
|
|
||||||
class TestAsyncAwait(GrammarTest):
|
class TestAsyncAwait(GrammarTest):
|
||||||
@pytest.mark.skipif('sys.version_info[0] < 3.5')
|
@pytest.mark.skipif('sys.version_info[:2] < (3, 5)')
|
||||||
def test_await_expr(self):
|
def test_await_expr(self):
|
||||||
parse("""async def foo():
|
parse("""async def foo():
|
||||||
await x
|
await x
|
||||||
@@ -94,13 +89,13 @@ class TestAsyncAwait(GrammarTest):
|
|||||||
await x
|
await x
|
||||||
""")
|
""")
|
||||||
|
|
||||||
@pytest.mark.skipif('sys.version_info[0] < 3.5')
|
@pytest.mark.skipif('sys.version_info[:2] < (3, 5)')
|
||||||
def test_async_var(self):
|
def test_async_var(self):
|
||||||
parse("""async = 1""")
|
parse("""async = 1""")
|
||||||
parse("""await = 1""")
|
parse("""await = 1""")
|
||||||
parse("""def async(): pass""")
|
parse("""def async(): pass""")
|
||||||
|
|
||||||
@pytest.mark.skipif('sys.version_info[0] < 3.5')
|
@pytest.mark.skipif('sys.version_info[:2] < (3, 5)')
|
||||||
def test_async_with(self):
|
def test_async_with(self):
|
||||||
parse("""async def foo():
|
parse("""async def foo():
|
||||||
async for a in b: pass""")
|
async for a in b: pass""")
|
||||||
@@ -108,7 +103,7 @@ class TestAsyncAwait(GrammarTest):
|
|||||||
self.invalid_syntax("""def foo():
|
self.invalid_syntax("""def foo():
|
||||||
async for a in b: pass""")
|
async for a in b: pass""")
|
||||||
|
|
||||||
@pytest.mark.skipif('sys.version_info[0] < 3.5')
|
@pytest.mark.skipif('sys.version_info[:2] < (3, 5)')
|
||||||
def test_async_for(self):
|
def test_async_for(self):
|
||||||
parse("""async def foo():
|
parse("""async def foo():
|
||||||
async with a: pass""")
|
async with a: pass""")
|
||||||
|
|||||||
Reference in New Issue
Block a user