2 new revisions:
Revision: 53774f9a3fa5
Branch: default
Author: Tatu Kairi <[email protected]>
Date: Wed Mar 20 06:34:45 2013
Log: Resolves issue 939: removed ability to create scalar variables
with li...
http://code.google.com/p/robotframework/source/detail?r=53774f9a3fa5
Revision: 16fc5f84effe
Branch: default
Author: Tatu Kairi <[email protected]>
Date: Wed Mar 20 06:41:04 2013
Log: Resolves issue 939: removed ability to create scalar variables
with li...
http://code.google.com/p/robotframework/source/detail?r=16fc5f84effe
==============================================================================
Revision: 53774f9a3fa5
Branch: default
Author: Tatu Kairi <[email protected]>
Date: Wed Mar 20 06:34:45 2013
Log: Resolves issue 939: removed ability to create scalar variables
with list values in variable table
http://code.google.com/p/robotframework/source/detail?r=53774f9a3fa5
Modified:
/atest/robot/variables/variable_table.txt
/atest/testdata/parsing/multirow.txt
/atest/testdata/standard_libraries/builtin/tags/sub1.txt
/atest/testdata/variables/resvarfiles/resource.txt
/atest/testdata/variables/variable_table.txt
/atest/testdata/variables/variables_from_resource_files.txt
/src/robot/variables/variables.py
=======================================
--- /atest/robot/variables/variable_table.txt Wed Jan 9 06:43:16 2013
+++ /atest/robot/variables/variable_table.txt Wed Mar 20 06:34:45 2013
@@ -3,7 +3,6 @@
Force Tags pybot jybot regression
Resource atest_resource.txt
-
*** Test Cases ***
Scalar String
Check Test Case ${TEST NAME}
@@ -16,18 +15,6 @@
Empty Scalar String
Check Test Case ${TEST NAME}
-
-Scalar List
- Check Test Case ${TEST NAME}
- Syslog Contains Deprecation Warning About Variable LIST
-
-Scalar List With Non-Strings
- Check Test Case ${TEST NAME}
- Syslog Contains Deprecation Warning About Variable LIST WITH NON
STRINGS
-
-Scalar List With Escapes
- Check Test Case ${TEST NAME}
- Syslog Contains Deprecation Warning About Variable LIST WITH ESCAPES
List With One Item
Check Test Case ${TEST NAME}
@@ -43,9 +30,6 @@
List With No Items
Check Test Case ${TEST NAME}
-
-Scalar Variable Containing List Is Different Than List Variable
- Check Test Case ${TEST NAME}
Variable Names Are Case Insensitive
Check Test Case ${TEST NAME}
@@ -62,11 +46,3 @@
Assign Mark With List Variable
Check Test Case ${TEST NAME}
-*** Keywords ***
-Syslog Contains Deprecation Warning About Variable
- [Arguments] ${name}
- Check Syslog Contains Regexp
- ... Creating a scalar variable with a list value in the Variable
table is
- ... deprecated and this functionality will be removed in Robot
Framework
- ... 2\\.8\\. Create a list variable '@\\{${name}}' and use it as a
scalar
- ... variable '\\$\\{${name}}' instead in file '.*'\\.
=======================================
--- /atest/testdata/parsing/multirow.txt Tue Feb 28 06:30:19 2012
+++ /atest/testdata/parsing/multirow.txt Wed Mar 20 06:34:45 2013
@@ -17,7 +17,7 @@
*** Variables ***
... # Invalid usage
-${scalarlist} 1 2 3 4
+@{scalarlist} 1 2 3 4
... 5 6 7
... 8
...
=======================================
--- /atest/testdata/standard_libraries/builtin/tags/sub1.txt Thu Aug 30
23:46:56 2012
+++ /atest/testdata/standard_libraries/builtin/tags/sub1.txt Wed Mar 20
06:34:45 2013
@@ -5,7 +5,7 @@
Library Collections
*** Variable ***
-${SUITE_TAGS} default force force-init set set-init
+@{SUITE_TAGS} default force force-init set set-init
*** Test Case ***
Set And Remove Tags In Suite Level
=======================================
--- /atest/testdata/variables/resvarfiles/resource.txt Fri Aug 31 03:56:36
2012
+++ /atest/testdata/variables/resvarfiles/resource.txt Wed Mar 20 06:34:45
2013
@@ -9,9 +9,7 @@
${NONE VALUE} ${None}
${ESCAPES} one \\ two \\\\ \${non_existing}
${NO VALUE} ${EMPTY}
-${LIST} Hello world !
-${LIST WITH NON STRINGS} ${42} ${-1.2} ${True} ${None}
-${LIST WITH ESCAPES} one \\ two \\\\ three \\\\\\
\${non_existing}
+@{LIST WITH NON STRINGS} ${42} ${-1.2} ${True} ${None}
@{ONE ITEM} Hello again?
@{LIST} Hello again ?
@{LIST WITH ESCAPES} one \\ two \\\\ three \\\\\\
\${non_existing}
=======================================
--- /atest/testdata/variables/variable_table.txt Thu Sep 13 12:42:10 2012
+++ /atest/testdata/variables/variable_table.txt Wed Mar 20 06:34:45 2013
@@ -1,4 +1,4 @@
-*** Variable ***
+*** Variables ***
${STRING} Hello world!
${INTEGER} ${42}
${FLOAT} ${-1.2}
@@ -6,9 +6,6 @@
${NONE VALUE} ${None}
${ESCAPES} one \\ two \\\\ \${non_existing}
${NO VALUE} ${EMPTY}
-${LIST} Hello world !
-${LIST WITH NON STRINGS} ${42} ${-1.2} ${True} ${None}
-${LIST WITH ESCAPES} one \\ two \\\\ three \\\\\\
\${non_existing}
@{ONE ITEM} Hello again?
@{LIST} Hello again ?
@{LIST WITH ESCAPES} one \\ two \\\\ three \\\\\\
\${non_existing}
@@ -41,25 +38,6 @@
Should Be Equal ${NO VALUE} ${EMPTY}
Should Be Equal "${NO VALUE}${NO VALUE}" ""
-Scalar List
- Should Not Be Equal ${LIST} Hello world !
- Should Be True ${LIST} == ['Hello','world', '!']
- Should Be Equal ${LIST[0]} Hello
- Should Be Equal ${LIST[1]} world
- Should Be Equal ${LIST[2]} !
-
-Scalar List With Non-Strings
- Should Be True ${LIST WITH NON STRINGS} == [42, -1.2, True, None]
-
-Scalar List With Escapes
- Should Be Equal ${LIST WITH ESCAPES [0]} one \\
- Should Be Equal ${LIST WITH ESCAPES [1]} two \\\\
- Should Be Equal ${LIST WITH ESCAPES [2]} three \\\\\\
- Should Be Equal ${LIST WITH ESCAPES [3]} \${non_existing}
- ${exp} = Create List one \\ two \\\\ three \\\\\\
\${non_existing}
- Should Be Equal ${LIST WITH ESCAPES} ${exp}
- Should Be True ${LIST WITH ESCAPES} == ['one \\\\', 'two
\\\\\\\\', 'three \\\\\\\\\\\\', '\${non_existing}'] Backslashes are
doubled here because 'Should Be True' uses 'eval' internally
-
List with One Item
Should Be True @{ONE ITEM} == ['Hello again?']
Should Be Equal @{ONE ITEM}[0] Hello again?
@@ -91,12 +69,6 @@
Should Be Equal ${ret} only value
Log @{EMPTY LIST}[0]
-Scalar Variable Containing List Is Different Than List Variable
- ${ret} = Catenate ${LIST}
- Should Be True ${ret} == ['Hello', 'world', '!']
- ${ret} = Catenate @{LIST}
- Should Be Equal ${ret} Hello again ?
-
Variable Names Are Case Insensitive
Should Be Equal ${lowercase} Variable name in lower case
Should Be Equal ${LOWERCASE} Variable name in lower case
=======================================
--- /atest/testdata/variables/variables_from_resource_files.txt Thu Mar 14
03:49:04 2013
+++ /atest/testdata/variables/variables_from_resource_files.txt Wed Mar 20
06:34:45 2013
@@ -27,10 +27,10 @@
Scalar List
Should Not Be Equal ${LIST} Hello world !
- Should Be True ${LIST} == ['Hello','world', '!']
+ Should Be True ${LIST} == ['Hello','again', '?']
Should Be Equal ${LIST[0]} Hello
- Should Be Equal ${LIST[1]} world
- Should Be Equal ${LIST[2]} !
+ Should Be Equal ${LIST[1]} again
+ Should Be Equal ${LIST[2]} ?
Scalar List With Non-Strings
Should Be True ${LIST WITH NON STRINGS} == [42, -1.2, True, None]
@@ -76,6 +76,7 @@
Log @{EMPTY LIST}[0]
Scalar Variable Containing List Is Different Than List Variable
+ ${LIST}= Set Variable Hello world !
${ret} = Catenate ${LIST}
Should Be True ${ret} == ['Hello', 'world', '!']
${ret} = Catenate @{LIST}
=======================================
--- /src/robot/variables/variables.py Thu Mar 14 03:49:04 2013
+++ /src/robot/variables/variables.py Wed Mar 20 06:34:45 2013
@@ -322,14 +322,12 @@
def _get_var_table_scalar_value(self, name, value, path=None):
if len(value) == 1:
return self.replace_scalar(value[0])
- msg = ("Creating a scalar variable with a list value in the
Variable "
- "table is deprecated and this functionality will be removed
in "
- "Robot Framework 2.8. Create a list variable '@%s' and use "
- "it as a scalar variable '%s' instead" % (name[1:], name))
+ msg = """\
+Creating a scalar variable with a list value in the Variable table is
deprecated.
+Create a list variable '@%s' and use it as a scalar variable '%s'
instead""" % (name[1:], name)
if path:
- msg += " in file '%s'" % path
- LOGGER.warn(msg + '.')
- return self.replace_list(value)
+ msg += '\nError in file: %s' % path
+ raise DataError(msg)
def _get_variables_from_var_file(self, var_file, args):
variables = self._get_dynamical_variables(var_file, args or ())
==============================================================================
Revision: 16fc5f84effe
Branch: default
Author: Tatu Kairi <[email protected]>
Date: Wed Mar 20 06:41:04 2013
Log: Resolves issue 939: removed ability to create scalar variables
with list values in variable table
http://code.google.com/p/robotframework/source/detail?r=16fc5f84effe
--
---
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.