|
| 1 | +From 70af9e3bab0217b0450d78c69e6c2ccb8f9c342d Mon Sep 17 00:00:00 2001 |
| 2 | +From: =?UTF-8?q?Pekka=20Kl=C3=A4rck?= < [email protected]> |
| 3 | +Date: Tue, 22 Oct 2019 21:53:33 +0300 |
| 4 | +Subject: [PATCH] Python 3.8 utest fixes: Consistent XML attributes order |
| 5 | + |
| 6 | +--- |
| 7 | + utest/result/golden.xml | 24 ++++++------- |
| 8 | + utest/result/goldenTwice.xml | 50 +++++++++++++-------------- |
| 9 | + utest/result/test_resultserializer.py | 3 ++ |
| 10 | + 3 files changed, 40 insertions(+), 37 deletions(-) |
| 11 | + |
| 12 | +diff --git a/utest/result/golden.xml b/utest/result/golden.xml |
| 13 | +index 6703b889b..a8e0b706c 100644 |
| 14 | +--- a/utest/result/golden.xml |
| 15 | ++++ b/utest/result/golden.xml |
| 16 | +@@ -1,9 +1,9 @@ |
| 17 | + <?xml version="1.0" encoding="UTF-8"?> |
| 18 | + <robot rpa="false" generated="20111024 13:41:20.873" generator="Robot trunk 20111007 (Python 2.7.2 on linux2)"> |
| 19 | +-<suite id="s1" source="normal.html" name="Normal"> |
| 20 | +-<kw type="setup" name="my setup"> |
| 21 | ++<suite id="s1" name="Normal" source="normal.html"> |
| 22 | ++<kw name="my setup" type="setup"> |
| 23 | + <timeout value="1 year"></timeout> |
| 24 | +-<status status="PASS" endtime="20111024 13:41:20.888" starttime="20111024 13:41:20.886"></status> |
| 25 | ++<status endtime="20111024 13:41:20.888" starttime="20111024 13:41:20.886" status="PASS"></status> |
| 26 | + </kw> |
| 27 | + <test id="s1-t1" name="First One"> |
| 28 | + <kw library="BuiltIn" name="Log"> |
| 29 | +@@ -11,8 +11,8 @@ |
| 30 | + <arguments> |
| 31 | + <arg>Test 1</arg> |
| 32 | + </arguments> |
| 33 | +-<msg timestamp="20111024 13:41:20.927" level="INFO">Test 1</msg> |
| 34 | +-<status status="PASS" endtime="20111024 13:41:20.928" starttime="20111024 13:41:20.926"></status> |
| 35 | ++<msg level="INFO" timestamp="20111024 13:41:20.927">Test 1</msg> |
| 36 | ++<status endtime="20111024 13:41:20.928" starttime="20111024 13:41:20.926" status="PASS"></status> |
| 37 | + </kw> |
| 38 | + <kw name="logs on trace"> |
| 39 | + <tags> |
| 40 | +@@ -27,21 +27,21 @@ |
| 41 | + <arg>Log on ${TEST NAME}</arg> |
| 42 | + <arg>TRACE</arg> |
| 43 | + </arguments> |
| 44 | +-<status status="PASS" endtime="20111024 13:41:20.932" starttime="20111024 13:41:20.931"></status> |
| 45 | ++<status endtime="20111024 13:41:20.932" starttime="20111024 13:41:20.931" status="PASS"></status> |
| 46 | + </kw> |
| 47 | +-<status status="PASS" endtime="20111024 13:41:20.933" starttime="20111024 13:41:20.930"></status> |
| 48 | ++<status endtime="20111024 13:41:20.933" starttime="20111024 13:41:20.930" status="PASS"></status> |
| 49 | + </kw> |
| 50 | + <doc>Test case documentation</doc> |
| 51 | + <tags> |
| 52 | + <tag>t1</tag> |
| 53 | + </tags> |
| 54 | +-<status status="PASS" endtime="20111024 13:41:20.934" critical="yes" starttime="20111024 13:41:20.925"></status> |
| 55 | ++<status critical="yes" endtime="20111024 13:41:20.934" starttime="20111024 13:41:20.925" status="PASS"></status> |
| 56 | + </test> |
| 57 | + <doc>Normal test cases</doc> |
| 58 | + <metadata> |
| 59 | + <item name="Something">My Value</item> |
| 60 | + </metadata> |
| 61 | +-<status status="PASS" endtime="20111024 13:41:20.952" starttime="20111024 13:41:20.873"></status> |
| 62 | ++<status endtime="20111024 13:41:20.952" starttime="20111024 13:41:20.873" status="PASS"></status> |
| 63 | + </suite> |
| 64 | + <statistics> |
| 65 | + <total> |
| 66 | +@@ -49,13 +49,13 @@ |
| 67 | + <stat fail="0" pass="1">All Tests</stat> |
| 68 | + </total> |
| 69 | + <tag> |
| 70 | +-<stat pass="1" fail="0">t1</stat> |
| 71 | ++<stat fail="0" pass="1">t1</stat> |
| 72 | + </tag> |
| 73 | + <suite> |
| 74 | +-<stat fail="0" name="Normal" id="s1" pass="1">Normal</stat> |
| 75 | ++<stat fail="0" id="s1" name="Normal" pass="1">Normal</stat> |
| 76 | + </suite> |
| 77 | + </statistics> |
| 78 | + <errors> |
| 79 | +- <msg timestamp="20111024 13:41:20.873" level="ERROR">Error in file 'normal.html' in table 'Settings': Resource file 'nope' does not exist.</msg> |
| 80 | ++ <msg level="ERROR" timestamp="20111024 13:41:20.873">Error in file 'normal.html' in table 'Settings': Resource file 'nope' does not exist.</msg> |
| 81 | + </errors> |
| 82 | + </robot> |
| 83 | +diff --git a/utest/result/goldenTwice.xml b/utest/result/goldenTwice.xml |
| 84 | +index ea60eca81..b5f117079 100644 |
| 85 | +--- a/utest/result/goldenTwice.xml |
| 86 | ++++ b/utest/result/goldenTwice.xml |
| 87 | +@@ -1,10 +1,10 @@ |
| 88 | + <?xml version="1.0" encoding="UTF-8"?> |
| 89 | + <robot generated="20111027 10:11:57.563" generator="Rebot trunk 20111007 (Python 2.7.2+ on linux2)"> |
| 90 | + <suite id="s1" name="Normal & Normal"> |
| 91 | +-<suite id="s1-s1" source="normal.html" name="Normal"> |
| 92 | +-<kw type="setup" name="my setup"> |
| 93 | ++<suite id="s1-s1" name="Normal" source="normal.html"> |
| 94 | ++<kw name="my setup" type="setup"> |
| 95 | + <timeout value="1 year"></timeout> |
| 96 | +-<status status="PASS" endtime="20111024 13:41:20.888" starttime="20111024 13:41:20.886"></status> |
| 97 | ++<status endtime="20111024 13:41:20.888" starttime="20111024 13:41:20.886" status="PASS"></status> |
| 98 | + </kw> |
| 99 | + <test id="s1-s1-t1" name="First One"> |
| 100 | + <kw library="BuiltIn" name="Log"> |
| 101 | +@@ -12,8 +12,8 @@ |
| 102 | + <arguments> |
| 103 | + <arg>Test 1</arg> |
| 104 | + </arguments> |
| 105 | +-<msg timestamp="20111024 13:41:20.927" level="INFO">Test 1</msg> |
| 106 | +-<status status="PASS" endtime="20111024 13:41:20.928" starttime="20111024 13:41:20.926"></status> |
| 107 | ++<msg level="INFO" timestamp="20111024 13:41:20.927">Test 1</msg> |
| 108 | ++<status endtime="20111024 13:41:20.928" starttime="20111024 13:41:20.926" status="PASS"></status> |
| 109 | + </kw> |
| 110 | + <kw name="logs on trace"> |
| 111 | + <tags> |
| 112 | +@@ -28,26 +28,26 @@ |
| 113 | + <arg>Log on ${TEST NAME}</arg> |
| 114 | + <arg>TRACE</arg> |
| 115 | + </arguments> |
| 116 | +-<status status="PASS" endtime="20111024 13:41:20.932" starttime="20111024 13:41:20.931"></status> |
| 117 | ++<status endtime="20111024 13:41:20.932" starttime="20111024 13:41:20.931" status="PASS"></status> |
| 118 | + </kw> |
| 119 | +-<status status="PASS" endtime="20111024 13:41:20.933" starttime="20111024 13:41:20.930"></status> |
| 120 | ++<status endtime="20111024 13:41:20.933" starttime="20111024 13:41:20.930" status="PASS"></status> |
| 121 | + </kw> |
| 122 | + <doc>Test case documentation</doc> |
| 123 | + <tags> |
| 124 | + <tag>t1</tag> |
| 125 | + </tags> |
| 126 | +-<status status="PASS" endtime="20111024 13:41:20.934" critical="yes" starttime="20111024 13:41:20.925"></status> |
| 127 | ++<status critical="yes" endtime="20111024 13:41:20.934" starttime="20111024 13:41:20.925" status="PASS"></status> |
| 128 | + </test> |
| 129 | + <doc>Normal test cases</doc> |
| 130 | + <metadata> |
| 131 | + <item name="Something">My Value</item> |
| 132 | + </metadata> |
| 133 | +-<status status="PASS" endtime="20111024 13:41:20.952" starttime="20111024 13:41:20.873"></status> |
| 134 | ++<status endtime="20111024 13:41:20.952" starttime="20111024 13:41:20.873" status="PASS"></status> |
| 135 | + </suite> |
| 136 | +-<suite id="s1-s2" source="normal.html" name="Normal"> |
| 137 | +-<kw type="setup" name="my setup"> |
| 138 | ++<suite id="s1-s2" name="Normal" source="normal.html"> |
| 139 | ++<kw name="my setup" type="setup"> |
| 140 | + <timeout value="1 year"></timeout> |
| 141 | +-<status status="PASS" endtime="20111024 13:41:20.888" starttime="20111024 13:41:20.886"></status> |
| 142 | ++<status endtime="20111024 13:41:20.888" starttime="20111024 13:41:20.886" status="PASS"></status> |
| 143 | + </kw> |
| 144 | + <test id="s1-s2-t1" name="First One"> |
| 145 | + <kw library="BuiltIn" name="Log"> |
| 146 | +@@ -55,8 +55,8 @@ |
| 147 | + <arguments> |
| 148 | + <arg>Test 1</arg> |
| 149 | + </arguments> |
| 150 | +-<msg timestamp="20111024 13:41:20.927" level="INFO">Test 1</msg> |
| 151 | +-<status status="PASS" endtime="20111024 13:41:20.928" starttime="20111024 13:41:20.926"></status> |
| 152 | ++<msg level="INFO" timestamp="20111024 13:41:20.927">Test 1</msg> |
| 153 | ++<status endtime="20111024 13:41:20.928" starttime="20111024 13:41:20.926" status="PASS"></status> |
| 154 | + </kw> |
| 155 | + <kw name="logs on trace"> |
| 156 | + <tags> |
| 157 | +@@ -71,23 +71,23 @@ |
| 158 | + <arg>Log on ${TEST NAME}</arg> |
| 159 | + <arg>TRACE</arg> |
| 160 | + </arguments> |
| 161 | +-<status status="PASS" endtime="20111024 13:41:20.932" starttime="20111024 13:41:20.931"></status> |
| 162 | ++<status endtime="20111024 13:41:20.932" starttime="20111024 13:41:20.931" status="PASS"></status> |
| 163 | + </kw> |
| 164 | +-<status status="PASS" endtime="20111024 13:41:20.933" starttime="20111024 13:41:20.930"></status> |
| 165 | ++<status endtime="20111024 13:41:20.933" starttime="20111024 13:41:20.930" status="PASS"></status> |
| 166 | + </kw> |
| 167 | + <doc>Test case documentation</doc> |
| 168 | + <tags> |
| 169 | + <tag>t1</tag> |
| 170 | + </tags> |
| 171 | +-<status status="PASS" endtime="20111024 13:41:20.934" critical="yes" starttime="20111024 13:41:20.925"></status> |
| 172 | ++<status critical="yes" endtime="20111024 13:41:20.934" starttime="20111024 13:41:20.925" status="PASS"></status> |
| 173 | + </test> |
| 174 | + <doc>Normal test cases</doc> |
| 175 | + <metadata> |
| 176 | + <item name="Something">My Value</item> |
| 177 | + </metadata> |
| 178 | +-<status status="PASS" endtime="20111024 13:41:20.952" starttime="20111024 13:41:20.873"></status> |
| 179 | ++<status endtime="20111024 13:41:20.952" starttime="20111024 13:41:20.873" status="PASS"></status> |
| 180 | + </suite> |
| 181 | +-<status status="PASS" elapsedtime="158" endtime="N/A" starttime="N/A"></status> |
| 182 | ++<status elapsedtime="158" endtime="N/A" starttime="N/A" status="PASS"></status> |
| 183 | + </suite> |
| 184 | + <statistics> |
| 185 | + <total> |
| 186 | +@@ -95,16 +95,16 @@ |
| 187 | + <stat fail="0" pass="2">All Tests</stat> |
| 188 | + </total> |
| 189 | + <tag> |
| 190 | +-<stat pass="2" fail="0">t1</stat> |
| 191 | ++<stat fail="0" pass="2">t1</stat> |
| 192 | + </tag> |
| 193 | + <suite> |
| 194 | +-<stat fail="0" name="Normal & Normal" id="s1" pass="2">Normal & Normal</stat> |
| 195 | +-<stat fail="0" name="Normal" id="s1-s1" pass="1">Normal & Normal.Normal</stat> |
| 196 | +-<stat fail="0" name="Normal" id="s1-s2" pass="1">Normal & Normal.Normal</stat> |
| 197 | ++<stat fail="0" id="s1" name="Normal & Normal" pass="2">Normal & Normal</stat> |
| 198 | ++<stat fail="0" id="s1-s1" name="Normal" pass="1">Normal & Normal.Normal</stat> |
| 199 | ++<stat fail="0" id="s1-s2" name="Normal" pass="1">Normal & Normal.Normal</stat> |
| 200 | + </suite> |
| 201 | + </statistics> |
| 202 | + <errors> |
| 203 | +-<msg timestamp="20111024 13:41:20.873" level="ERROR">Error in file 'normal.html' in table 'Settings': Resource file 'nope' does not exist.</msg> |
| 204 | +-<msg timestamp="20111024 13:41:20.873" level="ERROR">Error in file 'normal.html' in table 'Settings': Resource file 'nope' does not exist.</msg> |
| 205 | ++<msg level="ERROR" timestamp="20111024 13:41:20.873">Error in file 'normal.html' in table 'Settings': Resource file 'nope' does not exist.</msg> |
| 206 | ++<msg level="ERROR" timestamp="20111024 13:41:20.873">Error in file 'normal.html' in table 'Settings': Resource file 'nope' does not exist.</msg> |
| 207 | + </errors> |
| 208 | + </robot> |
| 209 | +diff --git a/utest/result/test_resultserializer.py b/utest/result/test_resultserializer.py |
| 210 | +index e55679801..e310cf20f 100644 |
| 211 | +--- a/utest/result/test_resultserializer.py |
| 212 | ++++ b/utest/result/test_resultserializer.py |
| 213 | +@@ -15,6 +15,9 @@ |
| 214 | + |
| 215 | + class StreamXmlWriter(XmlWriter): |
| 216 | + |
| 217 | ++ def _order_attrs(self, attrs): |
| 218 | ++ return sorted(attrs) |
| 219 | ++ |
| 220 | + def _create_output(self, output): |
| 221 | + return output |
| 222 | + |
0 commit comments