Revision: 3253
Author: janne.t.harkonen
Date: Tue May 11 01:57:07 2010
Log: Let multiple syntax errors occur when dry run is used
http://code.google.com/p/robotframework/source/detail?r=3253

Modified:
 /trunk/src/robot/errors.py
 /trunk/src/robot/running/keywords.py

=======================================
--- /trunk/src/robot/errors.py  Thu May  6 00:51:55 2010
+++ /trunk/src/robot/errors.py  Tue May 11 01:57:07 2010
@@ -85,16 +85,22 @@

 class HandlerExecutionFailed(ExecutionFailed):

-    def __init__(self, error_details, is_test_or_suite_teardown):
+ def __init__(self, error_details, is_test_or_suite_teardown, is_dry_run):
         orig_error = error_details.error
         timeout = isinstance(orig_error, TimeoutError)
         syntax = isinstance(orig_error, DataError)
         exit = bool(getattr(orig_error, 'ROBOT_EXIT_ON_FAILURE', False))
cont = bool(getattr(orig_error, 'ROBOT_CONTINUE_ON_FAILURE', False))
         cont = cont or is_test_or_suite_teardown
+        self._is_dry_run = is_dry_run
ExecutionFailed.__init__(self, error_details.message, timeout, syntax,
                                  exit, cont)

+    def _continue_on_failure(self, cont):
+        if self._is_dry_run:
+            return True
+        return ExecutionFailed._continue_on_failure(self, cont)
+

 class ExecutionFailures(ExecutionFailed):

=======================================
--- /trunk/src/robot/running/keywords.py        Fri May  7 14:05:39 2010
+++ /trunk/src/robot/running/keywords.py        Tue May 11 01:57:07 2010
@@ -102,8 +102,8 @@
         context.output.fail(error_details.message)
         if error_details.traceback:
             context.output.debug(error_details.traceback)
-        raise HandlerExecutionFailed(error_details,
- self._in_test_or_suite_teardown(context.namespace))
+        is_teardown = self._in_test_or_suite_teardown(context.namespace)
+ raise HandlerExecutionFailed(error_details, is_teardown, context.dry_run)

     def _in_test_or_suite_teardown(self, namespace):
         test_or_suite = namespace.test or namespace.suite

Reply via email to