Author: Antonio Cuni <[email protected]>
Branch: oparser-mock-model
Changeset: r44858:05246139a0af
Date: 2011-06-09 12:00 +0200
http://bitbucket.org/pypy/pypy/changeset/05246139a0af/
Log: test_boxkind is not supported in the mock case
diff --git a/pypy/jit/tool/test/test_oparser.py
b/pypy/jit/tool/test/test_oparser.py
--- a/pypy/jit/tool/test/test_oparser.py
+++ b/pypy/jit/tool/test/test_oparser.py
@@ -6,9 +6,9 @@
from pypy.jit.metainterp.history import AbstractDescr, BoxInt, LoopToken,\
BoxFloat
-class TestOparser(object):
+class BaseTestOparser(object):
- OpParser = OpParser
+ OpParser = None
def parse(self, *args, **kwds):
kwds['OpParser'] = self.OpParser
@@ -103,14 +103,6 @@
assert loop.inputargs[0].value == 32
assert loop.operations[0].result.value == 42
- def test_boxkind(self):
- x = """
- [sum0]
- """
- loop = self.parse(x, None, {}, boxkinds={'sum': BoxInt})
- b = loop.getboxes()
- assert isinstance(b.sum0, BoxInt)
-
def test_getvar_const_ptr(self):
x = '''
[]
@@ -235,7 +227,21 @@
assert loop.last_offset == 30
-class TestOparserWithMock(TestOparser):
+class TestOpParser(BaseTestOparser):
+
+ OpParser = OpParser
+
+ def test_boxkind(self):
+ x = """
+ [sum0]
+ """
+ loop = self.parse(x, None, {}, boxkinds={'sum': BoxInt})
+ b = loop.getboxes()
+ assert isinstance(b.sum0, BoxInt)
+
+
+
+class TestOpParserWithMock(BaseTestOparser):
class OpParser(OpParser):
use_mock_model = True
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit