1818
1919
2020class Stat (object ):
21+ """Generic statistic object used for storing all the statistic values.
22+
23+ :ivar name: Human readable identifier of the object these statistics
24+ belong to. Either `All Tests` or `Critical Tests` for
25+ :class:`~robot.model.totalstatistics.TotalStatistics`,
26+ long name of the suite for
27+ :class:`~robot.model.suitestatistics.SuiteStatistics`
28+ or name of the tag for
29+ :class:`~robot.model.tagstatistics.TagStatistics`
30+ :ivar passed: Number of passed tests.
31+ :ivar failed: Number of failed tests.
32+ :ivar elapsed: Number of milliseconds it took to execute.
33+ """
2134
2235 def __init__ (self , name ):
2336 self .name = name
@@ -78,10 +91,21 @@ def visit(self, visitor):
7891
7992
8093class TotalStat (Stat ):
94+ """Stores statistic values for a test run.
95+
96+ :ivar type: Always string `total`.
97+ """
8198 type = 'total'
8299
83100
84101class SuiteStat (Stat ):
102+ """Stores statistics values for a single suite.
103+
104+ :ivar id: Identifier of the suite, e.g. `s1-s2`.
105+ :ivar elapsed: Number of milliseconds it took to execute this suite,
106+ including sub-suites.
107+ :ivar type: Always string `suite`
108+ """
85109 type = 'suite'
86110
87111 def __init__ (self , suite ):
@@ -102,6 +126,18 @@ def add_stat(self, other):
102126
103127
104128class TagStat (Stat ):
129+ """Stores statistic values for a single tag.
130+
131+ :ivar doc: Documentation of tag as a string.
132+ :ivar links: List of tuples in which the first value is the link URL and
133+ the second is the link title. An empty list by default.
134+ :ivar critical: ``True`` if tag is considered critical, ``False`` otherwise.
135+ :ivar non_critical: ``True`` if tag is considered non-critical, ``False``
136+ otherwise.
137+ :ivar combined: Pattern as a string if the tag is combined, an empty string
138+ otherwise.
139+ :ivar type: Always string `tag`.
140+ """
105141 type = 'tag'
106142
107143 def __init__ (self , name , doc = '' , links = None , critical = False ,
@@ -115,6 +151,10 @@ def __init__(self, name, doc='', links=None, critical=False,
115151
116152 @property
117153 def info (self ):
154+ """Returns additional information of the tag statistics
155+ are about. Either `critical`, `non-critical`, `combined` or an
156+ empty string.
157+ """
118158 if self .critical :
119159 return 'critical'
120160 if self .non_critical :
0 commit comments