You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Adjust grammar-checking test
This commit is contained in:
@@ -18,21 +18,20 @@ def test_grammar():
|
|||||||
right_recursive, dup_rhs) = p.check_sets()
|
right_recursive, dup_rhs) = p.check_sets()
|
||||||
|
|
||||||
# We have custom rules that create the below
|
# We have custom rules that create the below
|
||||||
expect_lhs = set(['expr1024', 'pos_arg', 'get_iter', 'attribute'])
|
expect_lhs = set(['pos_arg', 'get_iter', 'attribute'])
|
||||||
|
|
||||||
unused_rhs = set(['list', 'mkfunc',
|
unused_rhs = set(['list', 'mkfunc', 'dict',
|
||||||
'mklambda',
|
'mklambda',
|
||||||
'unpack',])
|
'unpack',])
|
||||||
expect_right_recursive = set([('designList',
|
expect_right_recursive = set([('designList',
|
||||||
('store', 'DUP_TOP', 'designList'))])
|
('store', 'DUP_TOP', 'designList'))])
|
||||||
|
expect_lhs.add('kvlist')
|
||||||
|
expect_lhs.add('kv3')
|
||||||
if PYTHON3:
|
if PYTHON3:
|
||||||
expect_lhs.add('load_genexpr')
|
expect_lhs.add('load_genexpr')
|
||||||
expect_lhs.add('kvlist')
|
|
||||||
expect_lhs.add('kv3')
|
|
||||||
|
|
||||||
unused_rhs = unused_rhs.union(set("""
|
unused_rhs = unused_rhs.union(set("""
|
||||||
except_pop_except generator_exp
|
except_pop_except generator_exp
|
||||||
dict
|
|
||||||
""".split()))
|
""".split()))
|
||||||
if PYTHON_VERSION >= 3.0:
|
if PYTHON_VERSION >= 3.0:
|
||||||
expect_lhs.add("annotate_arg")
|
expect_lhs.add("annotate_arg")
|
||||||
|
Reference in New Issue
Block a user