Skip to content

tagstatistics

TagStatistics

Container for tag statistics.

Source code in src/robot/model/tagstatistics.py
class TagStatistics:
    """Container for tag statistics."""

    def __init__(self, combined_stats):
        #: Dictionary, where key is the name of the tag as a string and value
        #: is an instance of :class:`~robot.model.stats.TagStat`.
        self.tags = NormalizedDict(ignore='_')
        #: List of :class:`~robot.model.stats.CombinedTagStat` objects.
        self.combined = combined_stats

    def visit(self, visitor):
        visitor.visit_tag_statistics(self)

    def __iter__(self):
        return iter(sorted(chain(self.combined, self.tags.values())))