3 new revisions:

Revision: ed8e0e5df3ee
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 06:46:09 2013
Log:      fixed listener test
http://code.google.com/p/robotframework/source/detail?r=ed8e0e5df3ee

Revision: c6a63b38d912
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 07:00:23 2013
Log: added template info to runnable test case and used it in listener. fix...
http://code.google.com/p/robotframework/source/detail?r=c6a63b38d912

Revision: d717824b0b3a
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 07:24:17 2013
Log:      Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=d717824b0b3a

==============================================================================
Revision: ed8e0e5df3ee
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 06:46:09 2013
Log:      fixed listener test
http://code.google.com/p/robotframework/source/detail?r=ed8e0e5df3ee

Modified:
 /atest/robot/output/listener_interface/listener_logging.txt

=======================================
--- /atest/robot/output/listener_interface/listener_logging.txt Mon Jun 18 00:57:01 2012 +++ /atest/robot/output/listener_interface/listener_logging.txt Thu May 30 06:46:09 2013
@@ -37,8 +37,8 @@
     Correct start/end warnings should be shown in execution errors

 Execution errors should have messages from message and log_message methods
- Check Log Message ${ERRORS.msgs[0]} message: INFO Robot Framework * WARN pattern=yes - Check Log Message ${ERRORS.msgs[-5]} log_message: DEBUG Traceback * WARN pattern=yes + Check Log Message ${ERRORS[0]} message: INFO Robot Framework * WARN pattern=yes + Check Log Message ${ERRORS[-4]} log_message: DEBUG Traceback * WARN pattern=yes

 Correct start/end warnings should be shown in execution errors
     ${msgs} =  Get start/end messages  ${ERRORS.msgs}

==============================================================================
Revision: c6a63b38d912
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 07:00:23 2013
Log: added template info to runnable test case and used it in listener. fixes one test.
http://code.google.com/p/robotframework/source/detail?r=c6a63b38d912

Modified:
 /src/robot/new_running/builder.py
 /src/robot/new_running/model.py
 /src/robot/new_running/runner.py
 /src/robot/output/listeners.py
 /src/robot/running/context.py
 /utest/new_running/test_builder.py

=======================================
--- /src/robot/new_running/builder.py   Wed May 29 13:42:55 2013
+++ /src/robot/new_running/builder.py   Thu May 30 07:00:23 2013
@@ -77,7 +77,7 @@
         test = suite.tests.create(name=data.name,
                                   doc=unicode(data.doc),
                                   tags=values.tags.value,
- continue_on_failure=bool(values.template), + template=self._get_template(values.template), timeout=self._get_timeout(values.timeout))
         self._create_setup(test, values.setup)
         for step_data in data.steps:
@@ -87,6 +87,9 @@
     def _get_timeout(self, timeout):
         return (timeout.value, timeout.message) if timeout else None

+    def _get_template(self, template):
+        return unicode(template) if template.is_active() else None
+
     def _create_user_keyword(self, suite, data):
         # TODO: Tests and uks have inconsistent timeout types
         # and also teardowns are handled totally differently.
=======================================
--- /src/robot/new_running/model.py     Thu May 30 06:08:32 2013
+++ /src/robot/new_running/model.py     Thu May 30 07:00:23 2013
@@ -72,12 +72,12 @@


 class TestCase(model.TestCase):
-    __slots__ = ['continue_on_failure']
+    __slots__ = ['template']
     keyword_class = Keyword

-    def __init__(self, continue_on_failure=False, **kwargs):
+    def __init__(self, template=None, **kwargs):
         model.TestCase.__init__(self, **kwargs)
-        self.continue_on_failure = continue_on_failure
+        self.template = template

     @setter
     def timeout(self, timeout):
=======================================
--- /src/robot/new_running/runner.py    Thu May 30 05:35:01 2013
+++ /src/robot/new_running/runner.py    Thu May 30 07:00:23 2013
@@ -108,8 +108,9 @@
                                           starttime=utils.get_timestamp(),
                                           timeout=self._get_timeout(test),
                                           status='RUNNING')
-        keywords = Keywords(test.keywords.normal, test.continue_on_failure)
+        keywords = Keywords(test.keywords.normal, bool(test.template))
         self._context.start_test(result)
+        self._output.start_test(ModelCombiner(result, test))
         status = TestStatus(self._suite_status)
         if not status.failures and not test.name:
status.test_failed('Test case name cannot be empty.', result.critical)
@@ -137,6 +138,7 @@
         result.status = status.status
         result.message = status.message or result.message
         result.endtime = utils.get_timestamp()
+        self._output.end_test(ModelCombiner(result, test))
         self._context.end_test(result)

     def _get_timeout(self, test):
=======================================
--- /src/robot/output/listeners.py      Tue May 28 01:19:31 2013
+++ /src/robot/output/listeners.py      Thu May 30 07:00:23 2013
@@ -113,7 +113,7 @@
             else:
                 attrs = self._get_start_attrs(test, 'tags')
                 attrs['critical'] = 'yes' if test.critical else 'no'
- attrs['template'] = getattr(test, 'template', None) or '' # TODO: Doesn't work correctly with new run
+                attrs['template'] = test.template or ''
                 li.call_method(li.start_test, test.name, attrs)

     def end_test(self, test):
@@ -124,7 +124,7 @@
             else:
                 attrs = self._get_end_attrs(test, 'tags')
                 attrs['critical'] = 'yes' if test.critical else 'no'
- attrs['template'] = getattr(test, 'template', None) or '' # TODO: Doesn't work correctly with new run
+                attrs['template'] = test.template or ''
                 li.call_method(li.end_test, test.name, attrs)

     def start_keyword(self, kw):
=======================================
--- /src/robot/running/context.py       Wed May 29 09:54:44 2013
+++ /src/robot/running/context.py       Thu May 30 07:00:23 2013
@@ -98,7 +98,6 @@
         self._in_keyword_teardown -= 1

     def end_test(self, test):
-        self.output.end_test(test)
         self.namespace.end_test()
         self.set_prev_test_variables(test)

@@ -134,7 +133,6 @@

     def start_test(self, test):
         self.namespace.start_test(test)
-        self.output.start_test(test)

     def set_test_status_before_teardown(self, message, status):
         self.namespace.set_test_status_before_teardown(message, status)
=======================================
--- /utest/new_running/test_builder.py  Mon May 27 13:40:51 2013
+++ /utest/new_running/test_builder.py  Thu May 30 07:00:23 2013
@@ -55,8 +55,8 @@
         assert_equals(test.name, 'Fail')
         assert_equals(test.doc, 'FAIL Expected failure')
         assert_equals(list(test.tags), ['fail', 'force'])
-        assert_true(not test.timeout)
-        assert_equals(test.continue_on_failure, False)
+        assert_equals(test.timeout, None)
+        assert_equals(test.template, None)

     def test_test_keywords(self):
         kw = build('pass_and_fail.txt').tests[0].keywords[0]
@@ -115,8 +115,8 @@

     def test_from_setting_table(self):
         test = build('../running/test_template.txt').tests[0]
- assert_keyword(test.keywords[0], (), 'Should Be Equal',('Fail', 'Fail'))
-        assert_equals(test.continue_on_failure, True)
+ assert_keyword(test.keywords[0], (), 'Should Be Equal', ('Fail', 'Fail'))
+        assert_equals(test.template, 'Should Be Equal')

     def test_from_test_case(self):
         test = build('../running/test_template.txt').tests[3]
@@ -124,10 +124,10 @@
         assert_keyword(kws[0], (), 'Should Not Be Equal', ('Same', 'Same'))
         assert_keyword(kws[1], (), 'Should Not Be Equal', ('42', '43'))
assert_keyword(kws[2], (), 'Should Not Be Equal', ('Something', 'Different'))
-        assert_equals(test.continue_on_failure, True)
+        assert_equals(test.template, 'Should Not Be Equal')

     def test_no_variable_assign(self):
         test = build('../running/test_template.txt').tests[8]
         assert_keyword(test.keywords[0], (), 'Expect Exactly Three Args',
('${SAME VARIABLE}', 'Variable content', '${VARIABLE}'))
-        assert_equals(test.continue_on_failure, True)
+        assert_equals(test.template, 'Expect Exactly Three Args')

==============================================================================
Revision: d717824b0b3a
Branch:   default
Author:   Pekka Klärck
Date:     Thu May 30 07:24:17 2013
Log:      Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=d717824b0b3a

Modified:
 /src/robot/new_running/builder.py

=======================================
--- /src/robot/new_running/builder.py   Thu May 30 07:06:28 2013
+++ /src/robot/new_running/builder.py   Thu May 30 07:24:17 2013
@@ -90,7 +90,7 @@
         test = suite.tests.create(name=data.name,
                                   doc=unicode(data.doc),
                                   tags=values.tags.value,
- continue_on_failure=bool(values.template), + template=self._get_template(values.template), timeout=self._get_timeout(values.timeout))
         self._create_setup(test, values.setup)
         for step_data in data.steps:
@@ -100,6 +100,9 @@
     def _get_timeout(self, timeout):
         return (timeout.value, timeout.message) if timeout else None

+    def _get_template(self, template):
+        return unicode(template) if template.is_active() else None
+
     def _create_user_keyword(self, suite, data):
         # TODO: Tests and uks have inconsistent timeout types
         # and also teardowns are handled totally differently.

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to