2 new revisions:

Revision: e4acab6a0365
Branch:   default
Author:   Pekka Klärck
Date:     Fri May 24 07:29:50 2013
Log:      Removed support for variables from Test Template....
http://code.google.com/p/robotframework/source/detail?r=e4acab6a0365

Revision: 0211cdd2d323
Branch:   default
Author:   Pekka Klärck
Date:     Fri May 24 07:33:51 2013
Log:      Documented that test template cannot be used with variables....
http://code.google.com/p/robotframework/source/detail?r=0211cdd2d323

==============================================================================
Revision: e4acab6a0365
Branch:   default
Author:   Pekka Klärck
Date:     Fri May 24 07:29:50 2013
Log:      Removed support for variables from Test Template.

Update issue 566
Code and tests removed. Need to still remove docs from UG.
http://code.google.com/p/robotframework/source/detail?r=e4acab6a0365

Deleted:
 /atest/robot/running/test_template_variable.txt
 /atest/testdata/running/test_template_variable.txt
Modified:
 /atest/robot/running/test_template.txt
 /atest/testdata/running/test_template.txt
 /src/robot/running/defaultvalues.py
 /src/robot/running/fixture.py
 /src/robot/running/model.py
 /utest/running/test_default_values.py

=======================================
--- /atest/robot/running/test_template_variable.txt     Thu Mar 28 05:49:06 2013
+++ /dev/null
@@ -1,11 +0,0 @@
-*** Settings ***
-Suite Setup     Run Tests  ${EMPTY}  running/test_template_variable.txt
-Force Tags      regression  pybot  jybot
-Resource        atest_resource.txt
-
-*** Test Cases ***
-Variable Template Should Work
-    Check Test Case  ${TESTNAME}
-
-Overriding Variable Template
-    Check Test Case  ${TESTNAME}
=======================================
--- /atest/testdata/running/test_template_variable.txt Thu Mar 28 05:49:06 2013
+++ /dev/null
@@ -1,14 +0,0 @@
-*** Settings ***
-Test Template   ${TEMPLATE}
-
-*** Variables ***
-${TEMPLATE}     Should Not Be Equal
-
-*** Test Cases ***
-Variable Template Should Work
-  Fail   No reason
-
-Overriding Variable Template
-  [Documentation]  FAIL  Some reason
-  [Template]
-  Fail   Some reason
=======================================
--- /atest/robot/running/test_template.txt      Thu Mar 28 05:49:06 2013
+++ /atest/robot/running/test_template.txt      Fri May 24 07:29:50 2013
@@ -12,9 +12,6 @@

 Test Overriding Default Template In Test
     Check Test Case  ${TESTNAME}
-
-Test Using Variable As A Template
-    Check Test Case  ${TESTNAME}

 Test Overriding Default Template In Test With Empty
     Check Test Case  ${TESTNAME}
=======================================
--- /atest/testdata/running/test_template.txt   Thu Mar 28 05:49:06 2013
+++ /atest/testdata/running/test_template.txt   Fri May 24 07:29:50 2013
@@ -5,7 +5,6 @@
 *** Variables ***
 ${VARIABLE}       Variable content
 ${SAME VARIABLE}  Variable content
-${TEMPLATE}       Should Not Be Equal

 *** Test Cases ***
 Test Using Normal Keyword Is Not Possible With Template
@@ -24,11 +23,6 @@
   Something  Different
   42  43

-Test Using Variable As A Template
-  [Documentation]  FAIL Same == Same
-  [Template]  ${TEMPLATE}
-  Same  Same
-
 Test Overriding Default Template In Test With Empty
   [documentation]  FAIL This should be executed as normal keyword
   [Template]
@@ -57,7 +51,7 @@
   [Template]  Expect Exactly Two Args
   \           \
   ${EMPTY}    \
-
+
 Test Template With FOR Loop
   [Documentation]  FAIL Several failures occurred:\n\n
   ...  1) This != Fails\n\n
=======================================
--- /src/robot/running/defaultvalues.py Thu Mar 28 05:49:06 2013
+++ /src/robot/running/defaultvalues.py Fri May 24 07:29:50 2013
@@ -13,7 +13,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.

-from fixture import Setup, Teardown, TestTemplate
+from fixture import Setup, Teardown
 from timeouts import TestTimeout


@@ -66,5 +66,4 @@

     def get_template(self, template):
tmpl = (template if template.is_set() else self._test_template).value
-        tmpl = tmpl if tmpl and tmpl.upper() != 'NONE' else None
-        return TestTemplate(tmpl)
+        return tmpl if tmpl and tmpl.upper() != 'NONE' else None
=======================================
--- /src/robot/running/fixture.py       Thu Mar 28 05:49:06 2013
+++ /src/robot/running/fixture.py       Fri May 24 07:29:50 2013
@@ -54,8 +54,3 @@

 class Teardown(_Fixture):
     pass
-
-class TestTemplate(_Fixture):
-
-    def __init__(self, name):
-        _Fixture.__init__(self, name, None)
=======================================
--- /src/robot/running/model.py Wed May 22 05:42:48 2013
+++ /src/robot/running/model.py Fri May 24 07:29:50 2013
@@ -226,9 +226,8 @@
         self.teardown = defaults.get_teardown(tc_data.teardown)
         self.tags = defaults.get_tags(tc_data.tags)
         self.timeout = defaults.get_timeout(tc_data.timeout)
-        self._template = defaults.get_template(tc_data.template)
-        self._steps = tc_data.steps
-        self._keywords = None
+        self.template = defaults.get_template(tc_data.template)
+        self.keywords = Keywords(tc_data.steps, self.template)

     def run(self, context, parent_errors):
         errors = self._start_run(context, parent_errors)
@@ -238,16 +237,6 @@
             self._not_allowed_to_run(errors)
         self._end_run(context)

-    @property
-    def keywords(self):
-        if self._keywords is None:
-            self._keywords = Keywords(self._steps, self.template)
-        return self._keywords
-
-    @property
-    def template(self):
-        return self._template.name
-
     def _start_run(self, context, parent_errors):
         errors = TestRunErrors(parent_errors)
         self.status = 'RUNNING'
@@ -262,8 +251,6 @@
                                                      errors)
         self.setup.replace_variables(context.get_current_vars(), errors)
         self.teardown.replace_variables(context.get_current_vars(), errors)
- self._template.replace_variables(context.get_current_vars(), errors)
-        self._keywords = None
         tags = context.replace_vars_from_setting('Tags', self.tags, errors)
         self.tags = utils.normalize_tags(tags)
         self.timeout.replace_variables(context.get_current_vars())
=======================================
--- /utest/running/test_default_values.py       Thu Mar 28 05:49:06 2013
+++ /utest/running/test_default_values.py       Fri May 24 07:29:50 2013
@@ -47,9 +47,9 @@

     def test_template(self):
         template = Template('Template')
-        assert_equal(self.tcf_defaults.get_template(template).name,'Foo')
+        assert_equal(self.tcf_defaults.get_template(template), 'Foo')
         template.populate(['Bar'])
-        assert_equal(self.tcf_defaults.get_template(template).name,'Bar')
+        assert_equal(self.tcf_defaults.get_template(template), 'Bar')


 if __name__ == "__main__":

==============================================================================
Revision: 0211cdd2d323
Branch:   default
Author:   Pekka Klärck
Date:     Fri May 24 07:33:51 2013
Log:      Documented that test template cannot be used with variables.

Update issue 566
Labels: -Target-2.8
Status: WontFix
Update UG. Feature undone and this issue can be closed.
http://code.google.com/p/robotframework/source/detail?r=0211cdd2d323

Modified:
 /doc/userguide/src/CreatingTestData/CreatingTestCases.rst

=======================================
--- /doc/userguide/src/CreatingTestData/CreatingTestCases.rst Fri May 24 05:28:13 2013 +++ /doc/userguide/src/CreatingTestData/CreatingTestCases.rst Fri May 24 07:33:51 2013
@@ -762,8 +762,8 @@

 .. note:: Test templates is a new feature in Robot Framework 2.5.

-.. note:: In Robot Framework 2.8 enhancement to specify the template keyword
-         using a variable was added.
+.. note:: Unlike with other settings, it is not possible to define a template
+          using a variable.

 Different test case styles
 ~~~~~~~~~~~~~~~~~~~~~~~~~~

--

--- 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