Author: Ronan Lamy <[email protected]>
Branch: kill-ootype
Changeset: r65273:96cd77ae4ae1
Date: 2013-07-07 19:35 +0200
http://bitbucket.org/pypy/pypy/changeset/96cd77ae4ae1/
Log: Remove CLI leftovers
diff --git a/rpython/jit/backend/test/support.py
b/rpython/jit/backend/test/support.py
--- a/rpython/jit/backend/test/support.py
+++ b/rpython/jit/backend/test/support.py
@@ -141,25 +141,3 @@
def _check_cbuilder(self, cbuilder):
pass
-
-class CliCompiledMixin(BaseCompiledMixin):
- type_system = 'ootype'
-
- def pre_translation_hook(self):
- from rpython.translator.oosupport.support import patch_os
- self.olddefs = patch_os()
-
- def post_translation_hook(self):
- from rpython.translator.oosupport.support import unpatch_os
- unpatch_os(self.olddefs) # restore original values
-
- def _compile_and_run(self, t, entry_point, entry_point_graph, args):
- from rpython.translator.cli.test.runtest import compile_graph
- func = compile_graph(entry_point_graph, t, nowrap=True,
standalone=True)
- return func(*args)
-
- def run_directly(self, fn, args):
- from rpython.translator.cli.test.runtest import compile_function,
get_annotation
- ann = [get_annotation(x) for x in args]
- clifunc = compile_function(fn, ann)
- return clifunc(*args)
diff --git a/rpython/rlib/parsing/test/test_tree.py
b/rpython/rlib/parsing/test/test_tree.py
--- a/rpython/rlib/parsing/test/test_tree.py
+++ b/rpython/rlib/parsing/test/test_tree.py
@@ -7,36 +7,36 @@
def test_nonterminal_simple(self):
pos = SourcePos(1,2,3)
- tree = Nonterminal(symbol="a",
+ tree = Nonterminal(symbol="a",
children=[
- Symbol(symbol="b",
- additional_info="b",
+ Symbol(symbol="b",
+ additional_info="b",
token=Token(name="B",
source="b",
source_pos=pos))])
assert tree.getsourcepos() == pos
-
+
def test_nonterminal_nested(self):
pos = SourcePos(1,2,3)
- tree = Nonterminal(symbol="a",
+ tree = Nonterminal(symbol="a",
children=[
Nonterminal(symbol="c",
children=[
- Symbol(symbol="b",
- additional_info="b",
+ Symbol(symbol="b",
+ additional_info="b",
token=Token(name="B",
source="b",
source_pos=pos))])])
assert tree.getsourcepos() == pos
-
+
def test_nonterminal_simple_empty(self):
- tree = Nonterminal(symbol="a",
+ tree = Nonterminal(symbol="a",
children=[])
assert len(tree.children) == 0 # trivial
py.test.raises(IndexError, tree.getsourcepos)
def test_nonterminal_nested_empty(self):
- tree = Nonterminal(symbol="a",
+ tree = Nonterminal(symbol="a",
children=[Nonterminal(symbol="c",
children=[Nonterminal(symbol="c",
children=[Nonterminal(symbol="c",
@@ -47,14 +47,14 @@
assert len(tree.children) != 0 # the not-so-trivial part.
py.test.raises(IndexError, tree.getsourcepos)
-class BaseTestTreeTranslated(object):
-
+class TestTreeTranslated(object):
def compile(self, f):
- raise NotImplementedError
-
+ from rpython.translator.c.test.test_genc import compile
+ return compile(f, [])
+
def test_nonterminal_simple_empty(self):
def foo():
- tree = Nonterminal(symbol="a",
+ tree = Nonterminal(symbol="a",
children=[])
try:
return tree.getsourcepos()
@@ -65,7 +65,7 @@
def test_nonterminal_nested_empty(self):
def foo():
- tree = Nonterminal(symbol="a",
+ tree = Nonterminal(symbol="a",
children=[Nonterminal(symbol="c",
children=[Nonterminal(symbol="c",
children=[Nonterminal(symbol="c",
@@ -79,18 +79,3 @@
return -42
f = self.compile(foo)
assert f() == -42
-
-
-class TestTreeTranslatedLLType(BaseTestTreeTranslated):
-
- def compile(self, f):
- from rpython.translator.c.test.test_genc import compile
- return compile(f, [])
-
-class TestTreeTranslatedOOType(BaseTestTreeTranslated):
-
- def compile(self, f):
- from rpython.translator.cli.test.runtest import compile_function
- return compile_function(f, [], auto_raise_exc=True, exctrans=True)
-
-
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit