[pypy-svn] r53339 - pypy/branch/js-refactoring/pypy/lang/js/test/ecma

fijal at codespeak.net fijal at codespeak.net
Fri Apr 4 18:47:47 CEST 2008


Author: fijal
Date: Fri Apr  4 18:47:47 2008
New Revision: 53339

Modified:
   pypy/branch/js-refactoring/pypy/lang/js/test/ecma/conftest.py
Log:
cache shellfile, greatly speeds up running ecma tests.


Modified: pypy/branch/js-refactoring/pypy/lang/js/test/ecma/conftest.py
==============================================================================
--- pypy/branch/js-refactoring/pypy/lang/js/test/ecma/conftest.py	(original)
+++ pypy/branch/js-refactoring/pypy/lang/js/test/ecma/conftest.py	Fri Apr  4 18:47:47 2008
@@ -37,8 +37,9 @@
 
         cls.interp = Interpreter()
         shellpath = rootdir/'shell.js'
-        t = load_file(str(shellpath))
-        cls.interp.run(t)
+        if not hasattr(cls, 'shellfile'):
+            cls.shellfile = load_file(str(shellpath))
+        cls.interp.run(cls.shellfile)
         cls.testcases = cls.interp.global_context.resolve_identifier('testcases')
         cls.tc = cls.interp.global_context.resolve_identifier('tc')
     init_interp = classmethod(init_interp)



More information about the Pypy-commit mailing list