3 new revisions:

Revision: 6bed686b6979
Branch:   default
Author:   Pekka Klärck
Date:     Tue May 27 21:01:22 2014 UTC
Log: XML lib: Same tests on running side w/ lxml than with standard ET...
http://code.google.com/p/robotframework/source/detail?r=6bed686b6979

Revision: 10ef8bcbb17d
Branch:   default
Author:   Pekka Klärck
Date:     Tue May 27 21:29:24 2014 UTC
Log: XML: Make tests needing lxml non-critical if it is not available....
http://code.google.com/p/robotframework/source/detail?r=10ef8bcbb17d

Revision: 06d3b9f00a81
Branch:   default
Author:   Pekka Klärck
Date:     Tue May 27 21:37:32 2014 UTC
Log:      XML: Emit a warning is lxml requested but not available....
http://code.google.com/p/robotframework/source/detail?r=06d3b9f00a81

==============================================================================
Revision: 6bed686b6979
Branch:   default
Author:   Pekka Klärck
Date:     Tue May 27 21:01:22 2014 UTC
Log:      XML lib: Same tests on running side w/ lxml than with standard ET

Update issue 1623
Enhanced tests.
http://code.google.com/p/robotframework/source/detail?r=6bed686b6979

Modified:
 /atest/robot/standard_libraries/xml/element_attribute_with_lxml.txt
 /atest/robot/standard_libraries/xml/element_should_exist_with_lxml.txt
 /atest/robot/standard_libraries/xml/element_text_with_lxml.txt
 /atest/robot/standard_libraries/xml/to_string_with_lxml.txt

=======================================
--- /atest/robot/standard_libraries/xml/element_attribute_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/element_attribute_with_lxml.txt Tue May 27 21:01:22 2014 UTC
@@ -32,7 +32,8 @@
     Check Test Case    ${TESTNAME}

 Element attribute should match
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+    Should Be Empty    ${tc.kws[0].msgs}

 Element attribute should match when no attribute exists
     Check Test Case    ${TESTNAME}
=======================================
--- /atest/robot/standard_libraries/xml/element_should_exist_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/element_should_exist_with_lxml.txt Tue May 27 21:01:22 2014 UTC
@@ -5,25 +5,35 @@

 *** Test Cases ***
 Get Element Count
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+ Check Log Message ${tc.kws[0].kws[0].msgs[0]} 0 elements matched 'nonex'. + Check Log Message ${tc.kws[1].kws[0].msgs[0]} 1 element matched 'another'. + Check Log Message ${tc.kws[2].kws[0].msgs[0]} 1 element matched '.'. + Check Log Message ${tc.kws[3].kws[0].msgs[0]} 4 elements matched './/child'.

 Element Should Exist Passes When There Are One Or More Matches
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+ Check Log Message ${tc.kws[0].msgs[0]} 1 element matched 'another/child'.
+    Check Log Message    ${tc.kws[1].msgs[0]}   3 elements matched 'child'.

 Element Should Exist Fails When There Are No Matches
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+    Check Log Message    ${tc.kws[0].msgs[0]}   0 elements matched 'nönëx'.

 Element Should Exist With Custom Error Message
     Check Test Case    ${TESTNAME}

 Element Should Not Exist Passes When There Are No Matches
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+    Check Log Message    ${tc.kws[0].msgs[0]}   0 elements matched 'nonex'.

 Element Should Not Exist Fails When There Is One Match
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+ Check Log Message ${tc.kws[0].msgs[0]} 1 element matched 'another/child'.

 Element Should Not Exist Fails When There Are Multiple Matches
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+ Check Log Message ${tc.kws[0].msgs[0]} 4 elements matched './/child'.

 Element Should Not Exist With Custom Error Message
     Check Test Case    ${TESTNAME}
=======================================
--- /atest/robot/standard_libraries/xml/element_text_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/element_text_with_lxml.txt Tue May 27 21:01:22 2014 UTC
@@ -29,10 +29,13 @@
     Check Test Case    ${TESTNAME}

 Element text should be
-    Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+    Should Be Empty    ${tc.kws[0].msgs}

 Element text should match
     Check Test Case    ${TESTNAME}
+    ${tc} =    Check Test Case    ${TESTNAME}
+    Should Be Empty    ${tc.kws[0].msgs}

 Element text should be with whitespace normalized
     Check Test Case    ${TESTNAME}
=======================================
--- /atest/robot/standard_libraries/xml/to_string_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/to_string_with_lxml.txt Tue May 27 21:01:22 2014 UTC
@@ -1,5 +1,5 @@
 *** Settings ***
-Suite Setup Run Tests ${EMPTY} standard_libraries/xml/to_string_with_lxml.txt +Suite Setup Run Tests --loglevel debug standard_libraries/xml/to_string_with_lxml.txt
 Force Tags       regression    pybot    jybot
 Resource         atest_resource.txt

@@ -11,7 +11,11 @@
     Check Test Case    ${TESTNAME}

 Log element
-    Check Test Case    ${TESTNAME}
+    ${tc}=    Check Test Case    ${TESTNAME}
+ Check Log Message ${tc.kws[0].msgs[0]} <root>\n\t<täg attr="hyvä">sisältö</täg>\n</root> + Check Log Message ${tc.kws[2].msgs[0]} <root><tag a="1" c="3">päivää</tag></root> DEBUG + Check Log Message ${tc.kws[3].msgs[0]} <test name="root">*</test> pattern=yes

 Log child element
-    Check Test Case    ${TESTNAME}
+    ${tc}=    Check Test Case    ${TESTNAME}
+ Check Log Message ${tc.kws[0].msgs[0]} <täg attr="hyv&#xE4;">sisältö</täg>

==============================================================================
Revision: 10ef8bcbb17d
Branch:   default
Author:   Pekka Klärck
Date:     Tue May 27 21:29:24 2014 UTC
Log:      XML: Make tests needing lxml non-critical if it is not available.

Update issue 1623
Made tests non-critical when lxml not available.
http://code.google.com/p/robotframework/source/detail?r=10ef8bcbb17d

Added:
 /atest/robot/standard_libraries/xml/xml_resource.txt
Modified:
 /atest/robot/standard_libraries/xml/add_and_remove_elements.txt
 /atest/robot/standard_libraries/xml/add_and_remove_elements_with_lxml.txt
 /atest/robot/standard_libraries/xml/clear_element.txt
 /atest/robot/standard_libraries/xml/clear_element_with_lxml.txt
 /atest/robot/standard_libraries/xml/copy_element.txt
 /atest/robot/standard_libraries/xml/copy_element_with_lxml.txt
 /atest/robot/standard_libraries/xml/element_attribute.txt
 /atest/robot/standard_libraries/xml/element_attribute_with_lxml.txt
 /atest/robot/standard_libraries/xml/element_should_exist.txt
 /atest/robot/standard_libraries/xml/element_should_exist_with_lxml.txt
 /atest/robot/standard_libraries/xml/element_text.txt
 /atest/robot/standard_libraries/xml/element_text_with_lxml.txt
 /atest/robot/standard_libraries/xml/elements_should_be_equal.txt
 /atest/robot/standard_libraries/xml/elements_should_be_equal_with_lxml.txt
 /atest/robot/standard_libraries/xml/elements_should_match.txt
 /atest/robot/standard_libraries/xml/elements_should_match_with_lxml.txt
 /atest/robot/standard_libraries/xml/etree_namespaces.txt
 /atest/robot/standard_libraries/xml/etree_namespaces_with_lxml.txt
 /atest/robot/standard_libraries/xml/get_elements.txt
 /atest/robot/standard_libraries/xml/get_elements_with_lxml.txt
 /atest/robot/standard_libraries/xml/namespaces.txt
 /atest/robot/standard_libraries/xml/namespaces_with_lxml.txt
 /atest/robot/standard_libraries/xml/parsing.txt
 /atest/robot/standard_libraries/xml/parsing_with_lxml.txt
 /atest/robot/standard_libraries/xml/save_xml.txt
 /atest/robot/standard_libraries/xml/save_xml_with_lxml.txt
 /atest/robot/standard_libraries/xml/set_element_information.txt
 /atest/robot/standard_libraries/xml/set_element_information_with_lxml.txt
 /atest/robot/standard_libraries/xml/to_string.txt
 /atest/robot/standard_libraries/xml/to_string_with_lxml.txt
 /atest/robot/standard_libraries/xml/xpath.txt
 /atest/robot/standard_libraries/xml/xpath_with_lxml.txt
/atest/testdata/standard_libraries/xml/add_and_remove_elements_with_lxml.txt
 /atest/testdata/standard_libraries/xml/clear_element_with_lxml.txt
 /atest/testdata/standard_libraries/xml/copy_element_with_lxml.txt
 /atest/testdata/standard_libraries/xml/element_attribute_with_lxml.txt
 /atest/testdata/standard_libraries/xml/element_should_exist_with_lxml.txt
 /atest/testdata/standard_libraries/xml/element_text_with_lxml.txt
/atest/testdata/standard_libraries/xml/elements_should_be_equal_with_lxml.txt
 /atest/testdata/standard_libraries/xml/elements_should_match_with_lxml.txt
 /atest/testdata/standard_libraries/xml/etree_namespaces_with_lxml.txt
 /atest/testdata/standard_libraries/xml/get_elements_with_lxml.txt
 /atest/testdata/standard_libraries/xml/namespaces_with_lxml.txt
 /atest/testdata/standard_libraries/xml/parsing_with_lxml.txt
 /atest/testdata/standard_libraries/xml/resource.txt
 /atest/testdata/standard_libraries/xml/save_xml.txt
 /atest/testdata/standard_libraries/xml/save_xml_with_lxml.txt
/atest/testdata/standard_libraries/xml/set_element_information_with_lxml.txt
 /atest/testdata/standard_libraries/xml/to_string_with_lxml.txt
 /atest/testdata/standard_libraries/xml/xpath_with_lxml.txt

=======================================
--- /dev/null
+++ /atest/robot/standard_libraries/xml/xml_resource.txt Tue May 27 21:29:24 2014 UTC
@@ -0,0 +1,8 @@
+*** Settings ***
+Resource         atest_resource.txt
+
+*** Keywords ***
+Make test non-critical if lxml not available
+    Return From Keyword If    ${SUITE.metadata['lxml']}
+ Set Test Message Test made non-critical because lxml was not available.
+    Remove Tags    regression
=======================================
--- /atest/robot/standard_libraries/xml/add_and_remove_elements.txt Fri Oct 19 13:44:07 2012 UTC +++ /atest/robot/standard_libraries/xml/add_and_remove_elements.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/add_and_remove_elements.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/add_and_remove_elements_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/add_and_remove_elements_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/add_and_remove_elements_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Add Element
=======================================
--- /atest/robot/standard_libraries/xml/clear_element.txt Wed Oct 17 21:01:06 2012 UTC +++ /atest/robot/standard_libraries/xml/clear_element.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/clear_element.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/clear_element_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/clear_element_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/clear_element_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Clear Element
=======================================
--- /atest/robot/standard_libraries/xml/copy_element.txt Tue Sep 18 20:27:05 2012 UTC +++ /atest/robot/standard_libraries/xml/copy_element.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/copy_element.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/copy_element_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/copy_element_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/copy_element_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Elements Are Mutable
=======================================
--- /atest/robot/standard_libraries/xml/element_attribute.txt Thu Oct 18 08:58:11 2012 UTC +++ /atest/robot/standard_libraries/xml/element_attribute.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/element_attribute.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/element_attribute_with_lxml.txt Tue May 27 21:01:22 2014 UTC +++ /atest/robot/standard_libraries/xml/element_attribute_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/element_attribute_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Get attribute of current element
=======================================
--- /atest/robot/standard_libraries/xml/element_should_exist.txt Thu Sep 20 12:18:20 2012 UTC +++ /atest/robot/standard_libraries/xml/element_should_exist.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/element_should_exist.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/element_should_exist_with_lxml.txt Tue May 27 21:01:22 2014 UTC +++ /atest/robot/standard_libraries/xml/element_should_exist_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/element_should_exist_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Get Element Count
=======================================
--- /atest/robot/standard_libraries/xml/element_text.txt Wed Jul 25 16:10:36 2012 UTC +++ /atest/robot/standard_libraries/xml/element_text.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/element_text.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/element_text_with_lxml.txt Tue May 27 21:01:22 2014 UTC +++ /atest/robot/standard_libraries/xml/element_text_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/element_text_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Get text of current element
=======================================
--- /atest/robot/standard_libraries/xml/elements_should_be_equal.txt Thu Jul 26 09:23:41 2012 UTC +++ /atest/robot/standard_libraries/xml/elements_should_be_equal.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/elements_should_be_equal.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/elements_should_be_equal_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/elements_should_be_equal_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/elements_should_be_equal_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Elements should be equal
=======================================
--- /atest/robot/standard_libraries/xml/elements_should_match.txt Thu Jul 26 09:23:41 2012 UTC +++ /atest/robot/standard_libraries/xml/elements_should_match.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/elements_should_match.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/elements_should_match_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/elements_should_match_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/elements_should_match_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Elements should match
=======================================
--- /atest/robot/standard_libraries/xml/etree_namespaces.txt Wed Sep 26 11:00:25 2012 UTC +++ /atest/robot/standard_libraries/xml/etree_namespaces.txt Tue May 27 21:29:24 2014 UTC
@@ -2,7 +2,7 @@
 Documentation    Tests for using ElementTree's default namespace handling
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/etree_namespaces.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Tag names contain namespace in Clark Notation
=======================================
--- /atest/robot/standard_libraries/xml/etree_namespaces_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/etree_namespaces_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/etree_namespaces_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Tag names contain namespace in Clark Notation
=======================================
--- /atest/robot/standard_libraries/xml/get_elements.txt Tue Sep 18 08:48:39 2012 UTC +++ /atest/robot/standard_libraries/xml/get_elements.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/get_elements.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/get_elements_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/get_elements_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/get_elements_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Get element from parent element
=======================================
--- /atest/robot/standard_libraries/xml/namespaces.txt Wed Sep 26 11:00:25 2012 UTC +++ /atest/robot/standard_libraries/xml/namespaces.txt Tue May 27 21:29:24 2014 UTC
@@ -2,7 +2,7 @@
 Documentation    Tests for XML library's default namespace handling.
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/namespaces.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Tag names contain no namespaces
=======================================
--- /atest/robot/standard_libraries/xml/namespaces_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/namespaces_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/namespaces_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Tag names contain no namespaces
=======================================
--- /atest/robot/standard_libraries/xml/parsing.txt Mon Aug 6 12:31:31 2012 UTC +++ /atest/robot/standard_libraries/xml/parsing.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/parsing.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Parse file using forwards slash as path separator
=======================================
--- /atest/robot/standard_libraries/xml/parsing_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/parsing_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/parsing_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Parse file using forwards slash as path separator
=======================================
--- /atest/robot/standard_libraries/xml/save_xml.txt Tue Sep 18 08:21:55 2012 UTC +++ /atest/robot/standard_libraries/xml/save_xml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/save_xml.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/save_xml_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/save_xml_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/save_xml_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Save XML Element
=======================================
--- /atest/robot/standard_libraries/xml/set_element_information.txt Thu Oct 18 12:45:15 2012 UTC +++ /atest/robot/standard_libraries/xml/set_element_information.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/set_element_information.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/set_element_information_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/set_element_information_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/set_element_information_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Set Element Tag
=======================================
--- /atest/robot/standard_libraries/xml/to_string.txt Tue Jul 24 13:19:47 2012 UTC +++ /atest/robot/standard_libraries/xml/to_string.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,7 @@
 *** Settings ***
Suite Setup Run Tests --loglevel debug standard_libraries/xml/to_string.txt
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/to_string_with_lxml.txt Tue May 27 21:01:22 2014 UTC +++ /atest/robot/standard_libraries/xml/to_string_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests --loglevel debug standard_libraries/xml/to_string_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Element to string
=======================================
--- /atest/robot/standard_libraries/xml/xpath.txt Thu Sep 13 12:46:24 2012 UTC +++ /atest/robot/standard_libraries/xml/xpath.txt Tue May 27 21:29:24 2014 UTC
@@ -2,7 +2,7 @@
 Suite Setup      Run Tests    ${EMPTY}    standard_libraries/xml/xpath.txt
Test Setup Make Tests Requiring ET 1.3 Non-Critical If Requirement Not Met
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***

=======================================
--- /atest/robot/standard_libraries/xml/xpath_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/robot/standard_libraries/xml/xpath_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
Suite Setup Run Tests ${EMPTY} standard_libraries/xml/xpath_with_lxml.txt
+Test Teardown    Make test non-critical if lxml not available
 Force Tags       regression    pybot    jybot
-Resource         atest_resource.txt
+Resource         xml_resource.txt

 *** Test Cases ***
 Tag
=======================================
--- /atest/testdata/standard_libraries/xml/add_and_remove_elements_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/add_and_remove_elements_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt
 Test Setup        Parse XML To Test Variable    ${SIMPLE}    \${XML}
=======================================
--- /atest/testdata/standard_libraries/xml/clear_element_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/clear_element_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/copy_element_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/copy_element_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/element_attribute_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/element_attribute_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/element_should_exist_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/element_should_exist_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/element_text_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/element_text_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/elements_should_be_equal_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/elements_should_be_equal_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
+Test Template     Elements should not be equal
 Library           XML    lxml=yes
 Resource          resource.txt
-Test Template     Elements should not be equal

 *** Test Cases ***
 Elements should be equal
=======================================
--- /atest/testdata/standard_libraries/xml/elements_should_match_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/elements_should_match_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
+Test Template     Elements should not match
 Library           XML    lxml=yes
 Resource          resource.txt
-Test Template     Elements should not match

 *** Test cases ***
 Elements should match
=======================================
--- /atest/testdata/standard_libraries/xml/etree_namespaces_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/etree_namespaces_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,9 +1,10 @@
 *** Settings ***
+Suite Setup       Run Keywords    Set lxml availability to suite metadata
+...               AND    Remove File    ${OUTPUT}
+Test Setup Parse XML To Test Variable ${NS} \${ROOT} etree namespaces
+Test Teardown     Remove File    ${OUTPUT}
 Library           XML    lxml=yes
 Resource          resource.txt
-Suite Setup       Remove File    ${OUTPUT}
-Test Setup Parse XML To Test Variable ${NS} \${ROOT} etree namespaces
-Test Teardown     Remove File    ${OUTPUT}

 *** Test Cases ***
 Tag names contain namespace in Clark Notation
=======================================
--- /atest/testdata/standard_libraries/xml/get_elements_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/get_elements_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/namespaces_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/namespaces_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,8 +1,9 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
+Test Setup        Remove File    ${OUTPUT}
+Suite Teardown    Remove File    ${OUTPUT}
 Library           XML    lxml=yes
 Resource          resource.txt
-Test Setup        Remove File    ${OUTPUT}
-#Suite Teardown    Remove File    ${OUTPUT}

 *** Test Cases ***
 Tag names contain no namespaces
=======================================
--- /atest/testdata/standard_libraries/xml/parsing_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/parsing_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
--- /atest/testdata/standard_libraries/xml/resource.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/resource.txt Tue May 27 21:29:24 2014 UTC
@@ -73,3 +73,7 @@
      Element Attribute Should Be    ${elem}    {xxx}id    2
Saved XML Should Equal ${elem} <root xmlns:p="xxx" id="1" p:id="2"/>
      Elements Should Be Equal    ${elem}    ${OUTPUT}
+
+Set lxml availability to suite metadata
+     ${lib} =    Get Library Instance    XML
+     Set Suite Metadata    lxml    ${lib.lxml_etree}
=======================================
--- /atest/testdata/standard_libraries/xml/save_xml.txt Tue May 27 12:57:51 2014 UTC +++ /atest/testdata/standard_libraries/xml/save_xml.txt Tue May 27 21:29:24 2014 UTC
@@ -2,6 +2,7 @@
 Library           XML
 Resource          resource.txt
 Test Setup        Remove File    ${OUTPUT}
+Suite Teardown    Remove File    ${OUTPUT}

 *** Variables ***
 ${NON-ASCII}    <hyvää>yötä</hyvää>
=======================================
--- /atest/testdata/standard_libraries/xml/save_xml_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/save_xml_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,9 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
+Test Setup        Remove File    ${OUTPUT}
+Suite Teardown    Remove File    ${OUTPUT}
 Library           XML    lxml=yes
 Resource          resource.txt
-Test Setup        Remove File    ${OUTPUT}

 *** Variables ***
 ${SIMPLE SAVED}       <root><child id="1">text</child><c2><gc/></c2></root>
=======================================
--- /atest/testdata/standard_libraries/xml/set_element_information_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/set_element_information_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,7 +1,8 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
+Test Setup        Parse XML To Test Variable    ${SIMPLE}    \${XML}
 Library           XML    lxml=yes
 Resource          resource.txt
-Test Setup        Parse XML To Test Variable    ${SIMPLE}    \${XML}

 *** Test Cases ***

=======================================
--- /atest/testdata/standard_libraries/xml/to_string_with_lxml.txt Tue May 27 19:18:53 2014 UTC +++ /atest/testdata/standard_libraries/xml/to_string_with_lxml.txt Tue May 27 21:29:24 2014 UTC
@@ -1,4 +1,5 @@
 *** Settings ***
+Suite Setup       Set lxml availability to suite metadata
 Library           XML    lxml=yes
 Resource          resource.txt

=======================================
***Additional files exist in this changeset.***

==============================================================================
Revision: 06d3b9f00a81
Branch:   default
Author:   Pekka Klärck
Date:     Tue May 27 21:37:32 2014 UTC
Log:      XML: Emit a warning is lxml requested but not available.

Update issue 1623
Warning when lxml not available.
http://code.google.com/p/robotframework/source/detail?r=06d3b9f00a81

Modified:
 /atest/robot/standard_libraries/xml/xml_resource.txt
 /src/robot/libraries/XML.py

=======================================
--- /atest/robot/standard_libraries/xml/xml_resource.txt Tue May 27 21:29:24 2014 UTC +++ /atest/robot/standard_libraries/xml/xml_resource.txt Tue May 27 21:37:32 2014 UTC
@@ -1,8 +1,12 @@
 *** Settings ***
 Resource         atest_resource.txt

+*** Variables ***
+${NO LXML} XML library reverted to use standard ElementTree because requested lxml is not installed.
+
 *** Keywords ***
 Make test non-critical if lxml not available
     Return From Keyword If    ${SUITE.metadata['lxml']}
+    Check Log Message    ${ERRORS[0]}     ${NO LXML}    WARN
Set Test Message Test made non-critical because lxml was not available.
     Remove Tags    regression
=======================================
--- /src/robot/libraries/XML.py Tue May 27 19:18:53 2014 UTC
+++ /src/robot/libraries/XML.py Tue May 27 21:37:32 2014 UTC
@@ -376,6 +376,9 @@
             self.modern_etree = True
             self.lxml_etree = True
         else:
+            if not lxml_etree:
+ logger.warn('XML library reverted to use standard ElementTree '
+                            'because requested lxml is not installed.')
             self.etree = ET
             self.modern_etree = ET.VERSION >= '1.3'
             self.lxml_etree = False

--

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

Reply via email to