(self, actual: bytes, expected: bytes)
:returns: True if the relative error or absolute error is smaller than the accepted error
:returns: True if the relative error or absolute error is smaller than the accepted error
: returns : True if the relative error or absolute error is smaller than the accepted error
def __call__(self, actual: bytes, expected: bytes) -> bool:
        """
        :returns: True if the relative error or absolute error is smaller than the accepted error
        """
        try:
            x: Optional[float] = float(actual)
        except ValueError:
            x = None
        try:
            y: Optional[float] = float(expected)
        except ValueError:
            y = None
        if x is not None and y is not None:
            return math.isclose(x, y, rel_tol=self.rel_tol, abs_tol=self.abs_tol)
        else:
            return actual == expected
def __call__ ( self , actual : bytes , expected : bytes ) -> bool : try : x : Optional [ float ] = float ( actual ) except ValueError : x = None try : y : Optional [ float ] = float ( expected ) except ValueError : y = None if x is not None and y is not None : return math . isclose ( x , y , rel_tol = self . rel_tol , abs_tol = self . abs_tol ) else : return actual == expected