16 from robot.utils import (Sortable, elapsed_time_to_string, html_escape,
19 from .tags
import TagPattern
45 exclude_empty=True, values_as_strings=False,
50 attrs[
'label'] = self.
namename
55 attrs = dict((k, v)
for k, v
in attrs.items()
if v
not in (
'',
None))
57 attrs = dict((k, str(v)
if v
is not None else '')
58 for k, v
in attrs.items())
60 attrs = dict((k, self.
_html_escape_html_escape(v))
for k, v
in attrs.items())
88 self.
elapsedelapsed += test.elapsedtime
97 return not self.
failedfailed
100 visitor.visit_stat(self)
113 Stat.__init__(self, suite.longname)
122 return {
'id': self.
idid,
'name': self.
_name_name}
128 self.passed += other.passed
129 self.failed += other.failed
130 self.skipped += other.skipped
137 def __init__(self, name, doc='', links=None, combined=None):
138 Stat.__init__(self, name)
163 return ':::'.join(
'%s:%s' % (title, url)
for url, title
in self.
linkslinks)
174 def __init__(self, pattern, name=None, doc='', links=None):
175 TagStat.__init__(self, name
or pattern, doc, links, combined=pattern)
Generic statistic object used for storing all the statistic values.
def _html_escape(self, item)
def _update_stats(self, test)
def get_attributes(self, include_label=False, include_elapsed=False, exclude_empty=True, values_as_strings=False, html_escape=False)
def _get_custom_attrs(self)
def _update_elapsed(self, test)
Stores statistics values for a single suite.
def _get_custom_attrs(self)
def _update_elapsed(self, test)
def __init__(self, suite)
def add_stat(self, other)
Stores statistic values for a test run.
def html_escape(text, linkify=True)
def normalize(string, ignore=(), caseless=True, spaceless=True)
Normalizes given string according to given spec.
def elapsed_time_to_string(elapsed, include_millis=True)
Converts elapsed time in milliseconds to format 'hh:mm:ss.mil'.