Fix 3.7 aysnc def testing

This commit is contained in:
rocky
2018-04-20 11:15:52 -04:00
parent c397bf6bda
commit ef9ccc3a8c
8 changed files with 10 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ check-3.0 check-3.1 check-3.2 check-3.6:
$(MAKE) -C test $@
check-3.7: pytest
$(MAKE) -C test check
#:PyPy 2.6.1 PyPy 5.0.1, or PyPy 5.8.0-beta0
# Skip for now

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -295,12 +295,17 @@ class Python36Parser(Python35Parser):
""", nop_func)
if self.version > 3.6:
self.addRule("""
expr ::= call_ex_kw3
expr ::= call_ex_kw
expr ::= call_ex_kw3
expr ::= call_ex_kw4
call_ex_kw3 ::= expr
build_tuple_unpack_with_call
expr
CALL_FUNCTION_EX
call_ex_kw4 ::= expr
expr
expr
CALL_FUNCTION_EX
call_ex_kw ::= expr expr
build_map_unpack_with_call CALL_FUNCTION_EX
""", nop_func)

View File

@@ -350,7 +350,7 @@ def customize_for_version3(self, version):
self.n_call = n_call
def n_function_def(node):
if self.version == 3.6:
if self.version >= 3.6:
code_node = node[0][0]
else:
code_node = node[0][1]
@@ -634,7 +634,8 @@ def customize_for_version3(self, version):
if kwargs == 'expr':
kwargs = kwargs[0]
call_function_ex = node[-1]
assert call_function_ex == 'CALL_FUNCTION_EX_KW'
assert (call_function_ex == 'CALL_FUNCTION_EX_KW'
or (self.version >= 3.6 and call_function_ex == 'CALL_FUNCTION_EX'))
# FIXME: decide if the below test be on kwargs == 'dict'
if (call_function_ex.attr & 1 and
(not isinstance(kwargs, Token) and kwargs != 'attribute')