[pypy-commit] pypy framestate: fix test_all_opcodes_defined()

rlamy noreply at buildbot.pypy.org
Mon Nov 24 17:29:36 CET 2014


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: framestate
Changeset: r74668:ae2d25eea35d
Date: 2013-08-11 21:30 +0100
http://bitbucket.org/pypy/pypy/changeset/ae2d25eea35d/

Log:	fix test_all_opcodes_defined()

diff --git a/rpython/flowspace/test/test_objspace.py b/rpython/flowspace/test/test_objspace.py
--- a/rpython/flowspace/test/test_objspace.py
+++ b/rpython/flowspace/test/test_objspace.py
@@ -8,6 +8,7 @@
 from rpython.translator.simplify import simplify_graph
 from rpython.flowspace.objspace import build_flow
 from rpython.flowspace.flowcontext import FlowingError, FlowContext
+from rpython.flowspace.bytecode import BCInstruction
 from rpython.conftest import option
 from rpython.tool.stdlib_opcode import host_bytecode_spec
 
@@ -56,7 +57,8 @@
     opnames = set(host_bytecode_spec.method_names)
     methods = set([name for name in dir(FlowContext) if name.upper() == name])
     handled_elsewhere = set(['EXTENDED_ARG'])
-    missing = opnames - methods - handled_elsewhere
+    opcode_classes = set([cls.name for cls in BCInstruction.num2op.values()])
+    missing = opnames - methods - handled_elsewhere - opcode_classes
     assert not missing
 
 class TestFlowObjSpace(Base):


More information about the pypy-commit mailing list