diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2021-07-04 04:08:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 04:08:42 (GMT) |
commit | 9bf7c2d638a582af2444bc864feba13ab8957b68 (patch) | |
tree | a273f9feb6019ad8ce8675fe7142dd1e74d14538 /Lib/test/test_ast.py | |
parent | 000b9e803a7ec067da0a43f9a3fec16f1078215a (diff) | |
download | cpython-9bf7c2d638a582af2444bc864feba13ab8957b68.zip cpython-9bf7c2d638a582af2444bc864feba13ab8957b68.tar.gz cpython-9bf7c2d638a582af2444bc864feba13ab8957b68.tar.bz2 |
[3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)
* [Enum] revert enum module to 3.9
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r-- | Lib/test/test_ast.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index a44f8f5..3fac03d 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -1,7 +1,6 @@ import ast import builtins import dis -import enum import os import sys import types @@ -699,35 +698,6 @@ class AST_Tests(unittest.TestCase): with self.assertRaisesRegex(ValueError, f"Name node can't be used with '{constant}' constant"): compile(expr, "<test>", "eval") - def test_precedence_enum(self): - class _Precedence(enum.IntEnum): - """Precedence table that originated from python grammar.""" - TUPLE = enum.auto() - YIELD = enum.auto() # 'yield', 'yield from' - TEST = enum.auto() # 'if'-'else', 'lambda' - OR = enum.auto() # 'or' - AND = enum.auto() # 'and' - NOT = enum.auto() # 'not' - CMP = enum.auto() # '<', '>', '==', '>=', '<=', '!=', - # 'in', 'not in', 'is', 'is not' - EXPR = enum.auto() - BOR = EXPR # '|' - BXOR = enum.auto() # '^' - BAND = enum.auto() # '&' - SHIFT = enum.auto() # '<<', '>>' - ARITH = enum.auto() # '+', '-' - TERM = enum.auto() # '*', '@', '/', '%', '//' - FACTOR = enum.auto() # unary '+', '-', '~' - POWER = enum.auto() # '**' - AWAIT = enum.auto() # 'await' - ATOM = enum.auto() - def next(self): - try: - return self.__class__(self + 1) - except ValueError: - return self - enum._test_simple_enum(_Precedence, ast._Precedence) - class ASTHelpers_Test(unittest.TestCase): maxDiff = None |