aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 2dbf4eb2..b6fc6730 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -33,9 +33,20 @@ AUTODEBUGGER = path_from_root('tools', 'autodebugger.py')
GlobalCache = {}
+class Dummy: pass
+Settings = Dummy()
+Settings.saveJS = False
+
# Core test runner class, shared between normal tests and benchmarks
class RunnerCore(unittest.TestCase):
+ def tearDown(self):
+ if Settings.saveJS:
+ for name in os.listdir(self.get_dir()):
+ if name[-3:] == '.js':
+ shutil.copy(os.path.join(self.get_dir(), name),
+ os.path.join(TEMP_DIR, self.id().replace('__main__.', '').replace('.test_', '.')+'.js'))
+
def skip(self):
print >> sys.stderr, '<skip> ',