2 new revisions:

Revision: db87af18a683
Branch:   default
Author:   Pekka Klärck
Date:     Thu Apr 17 10:40:13 2014 UTC
Log: atests/dryrun: moved test for Import Library being called to new, more...
http://code.google.com/p/robotframework/source/detail?r=db87af18a683

Revision: df4fec1b04b6
Branch:   default
Author:   Pekka Klärck
Date:     Thu Apr 17 10:49:48 2014 UTC
Log: Special case `Set Library Search Order` so that it is executed also in...
http://code.google.com/p/robotframework/source/detail?r=df4fec1b04b6

==============================================================================
Revision: db87af18a683
Branch:   default
Author:   Pekka Klärck
Date:     Thu Apr 17 10:40:13 2014 UTC
Log: atests/dryrun: moved test for Import Library being called to new, more explicit suite
http://code.google.com/p/robotframework/source/detail?r=db87af18a683

Added:
 /atest/robot/cli/dryrun/executed_builtin_keywords.txt
 /atest/testdata/cli/dryrun/executed_builtin_keywords.txt
Modified:
 /atest/robot/cli/dryrun/dryrun.txt
 /atest/robot/cli/runner/deprecated_runmode/dryrun.txt
 /atest/testdata/cli/dryrun/dryrun.txt

=======================================
--- /dev/null
+++ /atest/robot/cli/dryrun/executed_builtin_keywords.txt Thu Apr 17 10:40:13 2014 UTC
@@ -0,0 +1,10 @@
+*** Settings ***
+Suite Setup Run Tests --dryrun cli/dryrun/executed_builtin_keywords.txt
+Force Tags        regression    pybot    jybot
+Resource          atest_resource.txt
+
+*** Test Cases ***
+Import Library
+    Check Test Case    ${TESTNAME}
+    Check Syslog Contains    Imported library 'String' with arguments [ ]
+ Check Syslog Contains Imported library 'ParameterLibrary' with arguments [ value | 42 ]
=======================================
--- /dev/null
+++ /atest/testdata/cli/dryrun/executed_builtin_keywords.txt Thu Apr 17 10:40:13 2014 UTC
@@ -0,0 +1,9 @@
+*** Variables ***
+${VARIABLE}       value
+
+*** Test Cases ***
+Import Library
+    Import Library    String
+    Get Line Count    foo
+    Import Library    ParameterLibrary    ${VARIABLE}    ${42}
+    Parameters
=======================================
--- /atest/robot/cli/dryrun/dryrun.txt  Tue Oct 15 11:46:40 2013 UTC
+++ /atest/robot/cli/dryrun/dryrun.txt  Thu Apr 17 10:40:13 2014 UTC
@@ -88,11 +88,6 @@
 Test from other suite
     Check Test Case  Some Other Test

-Import Library Keyword is Called
-    Check Test Case    ${TESTNAME}
-    Check Syslog Contains  Imported library 'String' with arguments [ ]
- Check Syslog Contains Imported library 'ParameterLibrary' with arguments [ value | 42 ]
-
 *** Keywords ***
 Should have correct number of keywords
     [Arguments]  ${test or uk}  ${exp number of kws}
=======================================
--- /atest/robot/cli/runner/deprecated_runmode/dryrun.txt Tue Oct 15 11:59:48 2013 UTC +++ /atest/robot/cli/runner/deprecated_runmode/dryrun.txt Thu Apr 17 10:40:13 2014 UTC
@@ -88,11 +88,6 @@
 Test from other suite
     Check Test Case  Some Other Test

-Import Library Keyword is Called
-    Check Test Case    ${TESTNAME}
-    Check Syslog Contains  Imported library 'String' with arguments [ ]
- Check Syslog Contains Imported library 'ParameterLibrary' with arguments [ value | 42 ]
-
 *** Keywords ***
 Should have correct number of keywords
     [Arguments]  ${test or uk}  ${exp number of kws}
=======================================
--- /atest/testdata/cli/dryrun/dryrun.txt       Sun Nov 24 18:39:03 2013 UTC
+++ /atest/testdata/cli/dryrun/dryrun.txt       Thu Apr 17 10:40:13 2014 UTC
@@ -89,12 +89,6 @@
     UK with multiple failures
     Does not exist

-Import Library Keyword is Called
-    Import Library   String
-    Get Line Count   foo
-    Import Library   ParameterLibrary   ${value}    ${42}
-    Parameters
-

 *** Keywords ***
 Embedded ${args} here

==============================================================================
Revision: df4fec1b04b6
Branch:   default
Author:   Pekka Klärck
Date:     Thu Apr 17 10:49:48 2014 UTC
Log: Special case `Set Library Search Order` so that it is executed also in dry-run.

Update issue 1688
Status: Done
Owner: pekka.klarck
My earlier analysis about the root case was correct. Fixed with a test.
http://code.google.com/p/robotframework/source/detail?r=df4fec1b04b6

Modified:
 /atest/robot/cli/dryrun/executed_builtin_keywords.txt
 /atest/testdata/cli/dryrun/executed_builtin_keywords.txt
 /src/robot/running/handlers.py

=======================================
--- /atest/robot/cli/dryrun/executed_builtin_keywords.txt Thu Apr 17 10:40:13 2014 UTC +++ /atest/robot/cli/dryrun/executed_builtin_keywords.txt Thu Apr 17 10:49:48 2014 UTC
@@ -8,3 +8,9 @@
     Check Test Case    ${TESTNAME}
     Check Syslog Contains    Imported library 'String' with arguments [ ]
Check Syslog Contains Imported library 'ParameterLibrary' with arguments [ value | 42 ]
+
+Set Library Search Order
+    ${tc} =    Check Test Case    ${TESTNAME}
+    Should Be Equal    ${tc.kws[1].name}    Second.Parameters
+    Should Be Equal    ${tc.kws[2].name}    First.Parameters
+    Should Be Equal    ${tc.kws[4].name}    Dynamic.Parameters
=======================================
--- /atest/testdata/cli/dryrun/executed_builtin_keywords.txt Thu Apr 17 10:40:13 2014 UTC +++ /atest/testdata/cli/dryrun/executed_builtin_keywords.txt Thu Apr 17 10:49:48 2014 UTC
@@ -1,3 +1,7 @@
+*** Settings ***
+Library    ParameterLibrary    first    1    WITH NAME    First
+Library    ParameterLibrary    second    2    WITH NAME    Second
+
 *** Variables ***
 ${VARIABLE}       value

@@ -5,5 +9,12 @@
 Import Library
     Import Library    String
     Get Line Count    foo
-    Import Library    ParameterLibrary    ${VARIABLE}    ${42}
+ Import Library ParameterLibrary ${VARIABLE} ${42} WITH NAME Dynamic
+    Dynamic.Parameters
+
+Set Library Search Order
+    Set Library Search Order    Second
+    Parameters
+    First.Parameters
+    Set Library Search Order    NonExisting    Dynamic    First
     Parameters
=======================================
--- /src/robot/running/handlers.py      Thu Apr 17 10:27:02 2014 UTC
+++ /src/robot/running/handlers.py      Thu Apr 17 10:49:48 2014 UTC
@@ -52,6 +52,8 @@
 class _RunnableHandler(object):
     type = 'library'
     _doc = ''
+    _executed_in_dry_run = ('BuiltIn.Import Library',
+                            'BuiltIn.Set Library Search Order')

     def __init__(self, library, handler_name, handler_method):
         self.library = library
@@ -101,7 +103,7 @@
         return self._run(context, args)

     def _dry_run(self, context, args):
-        if self.longname == 'BuiltIn.Import Library':
+        if self.longname in self._executed_in_dry_run:
             return self._run(context, args)
         self.resolve_arguments(args)
         return None

--

--- 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/d/optout.

Reply via email to