[pypy-commit] pypy py3k: sanitize the test class hierarchy: now we have only one compiler, so there is no need to have a base class and two subclasses, because they are actually the same

antocuni noreply at buildbot.pypy.org
Fri Jan 27 20:29:30 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r51884:131fb90722ed
Date: 2012-01-27 17:39 +0100
http://bitbucket.org/pypy/pypy/changeset/131fb90722ed/

Log:	sanitize the test class hierarchy: now we have only one compiler, so
	there is no need to have a base class and two subclasses, because
	they are actually the same

diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -6,7 +6,7 @@
 from pypy.interpreter.argument import Arguments
 from pypy.conftest import gettestobjspace
 
-class BaseTestCompiler:
+class TestPythonAstCompiler:
     def setup_method(self, method):
         self.compiler = self.space.createcompiler()
 
@@ -652,11 +652,6 @@
         assert ex.match(space, space.w_SyntaxError)
         assert 'hello_world' in space.str_w(space.str(ex.get_w_value(space)))
 
-
-class TestPythonAstCompiler_25_grammar(BaseTestCompiler):
-    def setup_method(self, method):
-        self.compiler = PythonAstCompiler(self.space, "2.5")
-
     def test_from_future_import(self):
         source = """from __future__ import with_statement
 with somtehing as stuff:
@@ -707,10 +702,6 @@
         else:
             py.test.fail("Did not raise")
 
-class TestECCompiler(BaseTestCompiler):
-    def setup_method(self, method):
-        self.compiler = self.space.getexecutioncontext().compiler
-
 
 class AppTestCompiler:
 
@@ -757,13 +748,6 @@
         assert math.copysign(1., c[1]) == -1.0
 
 
-##class TestPythonAstCompiler(BaseTestCompiler):
-##    def setup_method(self, method):
-##        self.compiler = PythonAstCompiler(self.space, "2.4")
-
-##    def test_try_except_finally(self):
-##        py.test.skip("unsupported")
-
 class AppTestOptimizer:
 
     def test_remove_ending(self):


More information about the pypy-commit mailing list