mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 06:04:54 +08:00
Finally able to delete a function because all the tests were generalized.
This commit is contained in:
@@ -246,7 +246,10 @@ GLOBAL_NONLOCAL_ERROR = [
|
|||||||
|
|
||||||
if sys.version_info >= (3, 6):
|
if sys.version_info >= (3, 6):
|
||||||
FAILING_EXAMPLES += GLOBAL_NONLOCAL_ERROR
|
FAILING_EXAMPLES += GLOBAL_NONLOCAL_ERROR
|
||||||
FAILING_EXAMPLES.append('(%s *d) = x' % ('a,' * 256))
|
FAILING_EXAMPLES += [
|
||||||
|
'(%s *d) = x' % ('a,' * 256),
|
||||||
|
'async def foo():\n def nofoo():[x async for x in []]',
|
||||||
|
]
|
||||||
if sys.version_info >= (3, 5):
|
if sys.version_info >= (3, 5):
|
||||||
FAILING_EXAMPLES += [
|
FAILING_EXAMPLES += [
|
||||||
'[*[] for a in [1]]',
|
'[*[] for a in [1]]',
|
||||||
@@ -397,20 +400,6 @@ def test_default_except_error_postition():
|
|||||||
assert error.start_pos[0] == 2
|
assert error.start_pos[0] == 2
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
('code', 'version'), [
|
|
||||||
('async def foo():\n def nofoo():[x async for x in []]', '3.6'),
|
|
||||||
]
|
|
||||||
)
|
|
||||||
def test_python_exception_matches_version(code, version):
|
|
||||||
if '.'.join(str(v) for v in sys.version_info[:2]) != version:
|
|
||||||
pytest.skip()
|
|
||||||
|
|
||||||
wanted, line_nr = _get_actual_exception(code)
|
|
||||||
error, = _get_error_list(code)
|
|
||||||
assert error.message in wanted
|
|
||||||
|
|
||||||
|
|
||||||
def test_statically_nested_blocks():
|
def test_statically_nested_blocks():
|
||||||
def build(code, depth):
|
def build(code, depth):
|
||||||
if depth == 0:
|
if depth == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user