[pypy-svn] r39173 - pypy/dist/pypy/lang/js/test/ecma

fijal at codespeak.net fijal at codespeak.net
Sun Feb 18 19:27:46 CET 2007


Author: fijal
Date: Sun Feb 18 19:27:45 2007
New Revision: 39173

Modified:
   pypy/dist/pypy/lang/js/test/ecma/conftest.py
Log:
Make tests actually run


Modified: pypy/dist/pypy/lang/js/test/ecma/conftest.py
==============================================================================
--- pypy/dist/pypy/lang/js/test/ecma/conftest.py	(original)
+++ pypy/dist/pypy/lang/js/test/ecma/conftest.py	Sun Feb 18 19:27:45 2007
@@ -23,6 +23,8 @@
 
 class JSTestFile(py.test.collect.Module):
     def init_interp(cls):
+        if hasattr(cls, 'interp'):
+            return
         cls.interp = Interpreter()
         ctx = cls.interp.global_context
         shellpath = rootdir/'shell.js'
@@ -40,6 +42,7 @@
             py.test.skip("ECMA tests disabled, run with --ecma")
         if option.collectonly:
             return
+        self.init_interp()
         #actually run the file :)
         t = load_source(self.filepath.read())
         try:
@@ -54,7 +57,7 @@
     def join(self, name):
         return JSTestItem(name, parent = self)
 
-class JSTestItem(py.test.collect.Item):        
+class JSTestItem(py.test.collect.Function):        
     def __init__(self, name, parent=None):
         #super(JSTestItem, self).__init__(filepath, parent)
         self.name = name



More information about the Pypy-commit mailing list