[pypy-svn] r36150 - pypy/dist/pypy/lang/js/test

santagada at codespeak.net santagada at codespeak.net
Thu Jan 4 16:12:49 CET 2007


Author: santagada
Date: Thu Jan  4 16:12:48 2007
New Revision: 36150

Added:
   pypy/dist/pypy/lang/js/test/autotestbase.py
Log:
code to use the mozilla-py.test translator


Added: pypy/dist/pypy/lang/js/test/autotestbase.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/lang/js/test/autotestbase.py	Thu Jan  4 16:12:48 2007
@@ -0,0 +1,17 @@
+# encoding: utf-8
+"""
+autotestbase.py
+"""
+
+from pypy.lang.js import interpreter
+
+class TestCase(object):
+    code = None
+    def setup_class(self):
+        self.inter = interpreter.Interpreter(self.code or ";")
+
+    def auto(self, expect, typeof, code):
+        self.inter.append_source(code)
+        r = self.inter.run()
+        assert r.GetValue().ToString() == expect
+        # TODO: assert typeof



More information about the Pypy-commit mailing list