Revision: 3164
Author: janne.t.harkonen
Date: Wed May 5 01:04:16 2010
Log: cleanup
http://code.google.com/p/robotframework/source/detail?r=3164
Modified:
/trunk/src/robot/running/model.py
/trunk/src/robot/running/namespace.py
=======================================
--- /trunk/src/robot/running/model.py Wed May 5 00:15:11 2010
+++ /trunk/src/robot/running/model.py Wed May 5 01:04:16 2010
@@ -191,7 +191,6 @@
return 'Test case contains no keywords'
def _run(self, output, namespace):
- self._init_context(namespace)
self.timeout.start()
self._run_setup(output, namespace)
if not self.run_errors.setup_failed():
@@ -208,10 +207,6 @@
self.timeout.set_keyword_timeout(err.timeout)
self._suite_errors.test_failed(exit=err.exit)
- def _init_context(self, namespace):
- namespace.variables['${TEST_NAME}'] = self.name
- namespace.variables['@{TEST_TAGS}'] = self.tags
-
def _run_setup(self, output, namespace):
self.setup.run(output, namespace, TestSetupListener(self))
@@ -222,8 +217,7 @@
self.message = message
else:
self.status = 'PASS'
- namespace.variables['${TEST_MESSAGE}'] = self.message
- namespace.variables['${TEST_STATUS}'] = self.status
+ namespace.test_ended(self.message, self.status)
def _run_teardown(self, output, namespace):
self.teardown.run(output, namespace, TestTeardownListener(self))
=======================================
--- /trunk/src/robot/running/namespace.py Wed Apr 14 06:08:25 2010
+++ /trunk/src/robot/running/namespace.py Wed May 5 01:04:16 2010
@@ -139,6 +139,8 @@
self.test = test
for lib in self._testlibs.values():
lib.start_test()
+ self.variables['${TEST_NAME}'] = test.name
+ self.variables['@{TEST_TAGS}'] = test.tags
def end_test(self):
self.test = None
@@ -147,6 +149,10 @@
for lib in self._testlibs.values():
lib.end_test()
+ def test_ended(self, message, status):
+ self.variables['${TEST_MESSAGE}'] = message
+ self.variables['${TEST_STATUS}'] = status
+
def end_suite(self):
self.suite = None
self.variables.end_suite()