diff --git a/pytest/test_grammar.py b/pytest/test_grammar.py index 8b3f6b88..406ad508 100644 --- a/pytest/test_grammar.py +++ b/pytest/test_grammar.py @@ -38,10 +38,10 @@ def test_grammar(): expect_right_recursive = set([("designList", ("store", "DUP_TOP", "designList"))]) - if PYTHON_VERSION_TRIPLE <= (3, 6): + if PYTHON_VERSION_TRIPLE[:2] <= (3, 6): unused_rhs.add("call") - if PYTHON_VERSION_TRIPLE >= (3, 0): + if PYTHON_VERSION_TRIPLE >= (2, 7): expect_lhs.add("kvlist") expect_lhs.add("kv3") unused_rhs.add("dict") @@ -69,7 +69,7 @@ def test_grammar(): unused_rhs.add("dict_comp") unused_rhs.add("classdefdeco1") unused_rhs.add("tryelsestmtl") - if PYTHON_VERSION_TRIPLE >= (3, 7): + if PYTHON_VERSION_TRIPLE >= (3, 5): expect_right_recursive.add( (("l_stmts", ("lastl_stmt", "come_froms", "l_stmts"))) ) @@ -116,6 +116,7 @@ def test_grammar(): RETURN_END_IF RETURN_END_IF_LAMBDA RETURN_VALUE_LAMBDA RETURN_LAST """.split() ) + if (2, 6) <= PYTHON_VERSION_TRIPLE <= (2, 7): opcode_set = set(s.opc.opname).union(ignore_set) if PYTHON_VERSION_TRIPLE[:2] == (2, 6): diff --git a/test/Makefile b/test/Makefile index c30383dc..279f67fb 100644 --- a/test/Makefile +++ b/test/Makefile @@ -23,7 +23,7 @@ COVER_DIR=../tmp/grammar-cover # Run short tests check-short: @$(PYTHON) -V && PYTHON_VERSION=`$(PYTHON) -V 2>&1 | cut -d ' ' -f 2 | cut -d'.' -f1,2` | head -1; \ - $(MAKE) check-bytecode-$${PYTHON_VERSION} + $(MAKE) check-bytecode-${PYTHON_VERSION} # Run all tests check: