(self)
return (num_metrics - len(not_asserted)) / num_metrics * 100
Return the metrics assertion coverage
Return the metrics assertion coverage
Return the metrics assertion coverage
def metrics_asserted_pct(self):
        """
        Return the metrics assertion coverage
        """
        num_metrics = len(self._metrics)
        num_asserted = len(self._asserted)

        if num_metrics == 0:
            if num_asserted == 0:
                return 100
            else:
                return 0

        # If it there have been assertions with at_least=0 the length of the num_metrics and num_asserted can match
        # even if there are different metrics in each set
        not_asserted = self.not_asserted()
        return (num_metrics - len(not_asserted)) / num_metrics * 100
def metrics_asserted_pct ( self ) : num_metrics = len ( self . _metrics ) num_asserted = len ( self . _asserted ) if num_metrics == 0 : if num_asserted == 0 : return 100 else : return 0 # If it there have been assertions with at_least=0 the length of the num_metrics and num_asserted can match # even if there are different metrics in each set not_asserted = self . not_asserted ( ) return ( num_metrics - len ( not_asserted ) ) / num_metrics * 100