2 new revisions:

Revision: d641ede8d9d6
Branch:   default
Author:   Pekka Klärck
Date:     Mon Sep 23 12:45:27 2013 UTC
Log:      Fixed error when same argument used as positional and named....
http://code.google.com/p/robotframework/source/detail?r=d641ede8d9d6

Revision: e8a8c0152a0d
Branch:   default
Author:   Pekka Klärck
Date:     Mon Sep 23 12:45:35 2013 UTC
Log:      Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=e8a8c0152a0d

==============================================================================
Revision: d641ede8d9d6
Branch:   default
Author:   Pekka Klärck
Date:     Mon Sep 23 12:45:27 2013 UTC
Log:      Fixed error when same argument used as positional and named.

Update issue 1525
Status: Done
Owner: pekka.klarck
Fixed with tests.
http://code.google.com/p/robotframework/source/detail?r=d641ede8d9d6

Modified:
 /atest/robot/keywords/named_args/with_python_keywords.txt
 /atest/testdata/keywords/named_args/with_dynamic_keywords.txt
 /atest/testdata/keywords/named_args/with_python_keywords.txt
 /src/robot/running/arguments/argumentvalidator.py

=======================================
--- /atest/robot/keywords/named_args/with_python_keywords.txt Tue Jun 4 10:10:25 2013 UTC +++ /atest/robot/keywords/named_args/with_python_keywords.txt Mon Sep 23 12:45:27 2013 UTC
@@ -12,6 +12,9 @@

 Mandatory And Named As Named
     Check Test Case    ${TESTNAME}
+
+Same Argument As Positional And Named Fails
+    Check Test Case    ${TESTNAME}

 Mandatory, Named And Varargs As Positional
     Check Test Case    ${TESTNAME}
=======================================
--- /atest/testdata/keywords/named_args/with_dynamic_keywords.txt Sun May 19 17:21:49 2013 UTC +++ /atest/testdata/keywords/named_args/with_dynamic_keywords.txt Mon Sep 23 12:45:27 2013 UTC
@@ -99,6 +99,8 @@
     missing value for argument 'a'.                   b=b
     got positional argument after named arguments.    b=b    b
     got multiple values for argument 'a'.             a      a=a
+    got multiple values for argument 'a'.             a      b      a=a
+    got multiple values for argument 'a'.             a      b=b    a=a

 Nön äscii named arguments
     ${result} =     Nön äscii named args   官话=官话     nönäscii=nönäscii
=======================================
--- /atest/testdata/keywords/named_args/with_python_keywords.txt Tue Jun 4 10:10:25 2013 UTC +++ /atest/testdata/keywords/named_args/with_python_keywords.txt Mon Sep 23 12:45:27 2013 UTC
@@ -22,6 +22,10 @@
     ${ret}=    Mandatory And Named    c=3    a=1    b=2
     Should Be Equal    ${ret}    1, 2, 3

+Same Argument As Positional And Named Fails
+ [Documentation] FAIL Keyword 'KwargsLibrary.One Named' got multiple values for argument 'named'.
+    One Named    positional    named=named
+
 Mandatory, Named And Varargs As Positional
     ${ret}=    Mandatory Named And Varargs    mandatory    d1    d2\=d2
     Should Be Equal    ${ret}    mandatory, d1, d2=d2, []
@@ -121,6 +125,9 @@
     expected 1 to 2 non-keyword arguments, got 0.
     missing value for argument 'a'.                   b=2
     missing value for argument 'a'.                   b=2    c=3    d=4
+    got multiple values for argument 'a'.             a      a=a
+    got multiple values for argument 'a'.             a      b      a=a
+    got multiple values for argument 'a'.             a      b=b    a=a
     expected 1 to 2 non-keyword arguments, got 3.     1      2      3

 Named combinations without varargs
@@ -138,6 +145,7 @@
     missing value for argument 'a'.                   b=b
     got positional argument after named arguments.    b=b    b
     got multiple values for argument 'a'.             a      a=a
+    got multiple values for argument 'a'.             a      b      a=a

 Working combinations with all argument types
     [Template]    Execute working combinations with everything
@@ -164,6 +172,8 @@
     [Template]    Execute illegal combinations with everything
     expected at least 1 non-keyword argument, got 0.    d1=d
     got multiple values for argument 'a'.               a      a=a
+    got multiple values for argument 'a'.               a      b       a=a
+    got multiple values for argument 'a'.               a      b=b     a=a
     got multiple values for argument 'a'.               a=a    a=a
     got positional argument after named arguments.      a=a    b
     got multiple values for argument 'b'.               a      b       b=b
=======================================
--- /src/robot/running/arguments/argumentvalidator.py Thu Sep 12 13:22:29 2013 UTC +++ /src/robot/running/arguments/argumentvalidator.py Mon Sep 23 12:45:27 2013 UTC
@@ -25,8 +25,8 @@
     def validate(self, positional, named, dryrun=False):
         if dryrun and any(is_list_var(arg) for arg in positional):
             return
-        self._validate_limits(positional, named, self._argspec)
         self._validate_no_multiple_values(positional, named, self._argspec)
+        self._validate_limits(positional, named, self._argspec)
self._validate_no_mandatory_missing(positional, named, self._argspec)

     def _validate_limits(self, positional, named, spec):

==============================================================================
Revision: e8a8c0152a0d
Branch:   default
Author:   Pekka Klärck
Date:     Mon Sep 23 12:45:35 2013 UTC
Log:      Automated merge with https://code.google.com/p/robotframework/
http://code.google.com/p/robotframework/source/detail?r=e8a8c0152a0d


--

--- 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 robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to