2 new revisions:
Revision: 2c578acf96c4
Author: Pekka Klärck
Date: Wed Nov 30 15:01:33 2011
Log: Stats in JS: Exclude stats with empty value similarly as in 2.6
http://code.google.com/p/robotframework/source/detail?r=2c578acf96c4
Revision: 1e3e3f84eb38
Author: Pekka Klärck
Date: Wed Nov 30 15:06:25 2011
Log: Python 2.5 compatibility
http://code.google.com/p/robotframework/source/detail?r=1e3e3f84eb38
==============================================================================
Revision: 2c578acf96c4
Author: Pekka Klärck
Date: Wed Nov 30 15:01:33 2011
Log: Stats in JS: Exclude stats with empty value similarly as in 2.6
http://code.google.com/p/robotframework/source/detail?r=2c578acf96c4
Modified:
/atest/robot/output/html_output_stats.py
/atest/robot/output/statistics_in_log_and_report.txt
/src/robot/model/stats.py
=======================================
--- /atest/robot/output/html_output_stats.py Wed Nov 30 14:45:46 2011
+++ /atest/robot/output/html_output_stats.py Wed Nov 30 15:01:33 2011
@@ -1,5 +1,8 @@
from robot.api import logger
+class WrongStat(AssertionError):
+ ROBOT_CONTINUE_ON_FAILURE = True
+
def get_total_stats(path):
return get_all_stats(path)[0]
@@ -28,8 +31,7 @@
def verify_stat(stat, *attrs):
expected = dict(_get_expected_stat(attrs))
if stat != expected:
- raise AssertionError('Wrong stat!\nGot: %s\nExpected: %s'
- % (stat, expected))
+ raise WrongStat('\n%-9s: %s\n%-9s: %s' % ('Got', stat, 'Expected',
expected))
def _get_expected_stat(attrs):
for key, value in (a.split(':', 1) for a in attrs):
=======================================
--- /atest/robot/output/statistics_in_log_and_report.txt Wed Nov 30
14:45:46 2011
+++ /atest/robot/output/statistics_in_log_and_report.txt Wed Nov 30
15:01:33 2011
@@ -53,13 +53,12 @@
${stats} = Get Tag Stats ${OUTDIR}${/}${file}
Length Should Be ${stats} 4
Verify stat ${stats[0]} label:t1 pass:5 fail:1
- ... info:critical links:T1:http://t/1 doc:the doc combined:
+ ... info:critical links:T1:http://t/1 doc:the doc
Verify stat ${stats[1]} label:t2 pass:2 fail:0
- ... info:non-critical links:T2:http://t/2 doc: combined:
+ ... info:non-critical links:T2:http://t/2
Verify stat ${stats[2]} label:f1 & t1 pass:5 fail:1
- ... info:combined links: doc: combined:f1 & t1
+ ... info:combined combined:f1 & t1
Verify stat ${stats[3]} label:d1 pass:1 fail:0
- ... info: links: doc: combined:
Verify suite stats
[Arguments] ${file}
=======================================
--- /src/robot/model/stats.py Wed Nov 30 04:43:40 2011
+++ /src/robot/model/stats.py Wed Nov 30 15:01:33 2011
@@ -36,7 +36,7 @@
def js_attrs(self):
attrs = {'label': self.name, 'pass': self.passed, 'fail':
self.failed}
attrs.update(self._get_custom_attrs())
- return attrs
+ return dict((key, value) for key, value in attrs.items() if
value != '')
def _get_custom_attrs(self):
return {}
==============================================================================
Revision: 1e3e3f84eb38
Author: Pekka Klärck
Date: Wed Nov 30 15:06:25 2011
Log: Python 2.5 compatibility
http://code.google.com/p/robotframework/source/detail?r=1e3e3f84eb38
Modified:
/atest/robot/output/html_output_stats.py
=======================================
--- /atest/robot/output/html_output_stats.py Wed Nov 30 15:01:33 2011
+++ /atest/robot/output/html_output_stats.py Wed Nov 30 15:06:25 2011
@@ -1,5 +1,7 @@
+from __future__ import with_statement
from robot.api import logger
+
class WrongStat(AssertionError):
ROBOT_CONTINUE_ON_FAILURE = True