How to use the testslide.matchers._FloatComparison function in TestSlide

To help you get started, we’ve selected a few TestSlide examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class FloatBetween(_FloatComparison):
    def __init__(self, lower: float, upper: float):
        super().__init__(ge=lower, le=upper)


class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
        super().__init__(gt=gt)


class FloatGreaterOrEquals(_FloatComparison):
    def __init__(self, ge: float):
        super().__init__(ge=ge)


class FloatLessThan(_FloatComparison):
    def __init__(self, lt):
        super().__init__(lt=lt)


class FloatLessOrEquals(_FloatComparison):
    def __init__(self, le):
        super().__init__(le=le)


# strings


class AnyStr(_RichComparison):
    def __init__(self):
        super().__init__(klass=str)
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
def __init__(self, le):
        super().__init__(le=le)


# floats
class AnyFloat(_FloatComparison):
    def __init__(self):
        super().__init__()


class NotThisFloat(_FloatComparison):
    def __init__(self, ne: float):
        super().__init__(ne=ne)


class FloatBetween(_FloatComparison):
    def __init__(self, lower: float, upper: float):
        super().__init__(ge=lower, le=upper)


class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
        super().__init__(gt=gt)


class FloatGreaterOrEquals(_FloatComparison):
    def __init__(self, ge: float):
        super().__init__(ge=ge)


class FloatLessThan(_FloatComparison):
    def __init__(self, lt):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
def __init__(self, ge: int):
        super().__init__(ge=ge)


class IntLessThan(_IntComparison):
    def __init__(self, lt):
        super().__init__(lt=lt)


class IntLessOrEquals(_IntComparison):
    def __init__(self, le):
        super().__init__(le=le)


# floats
class AnyFloat(_FloatComparison):
    def __init__(self):
        super().__init__()


class NotThisFloat(_FloatComparison):
    def __init__(self, ne: float):
        super().__init__(ne=ne)


class FloatBetween(_FloatComparison):
    def __init__(self, lower: float, upper: float):
        super().__init__(ge=lower, le=upper)


class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class NotThisFloat(_FloatComparison):
    def __init__(self, ne: float):
        super().__init__(ne=ne)


class FloatBetween(_FloatComparison):
    def __init__(self, lower: float, upper: float):
        super().__init__(ge=lower, le=upper)


class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
        super().__init__(gt=gt)


class FloatGreaterOrEquals(_FloatComparison):
    def __init__(self, ge: float):
        super().__init__(ge=ge)


class FloatLessThan(_FloatComparison):
    def __init__(self, lt):
        super().__init__(lt=lt)


class FloatLessOrEquals(_FloatComparison):
    def __init__(self, le):
        super().__init__(le=le)


# strings
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class AnyFloat(_FloatComparison):
    def __init__(self):
        super().__init__()


class NotThisFloat(_FloatComparison):
    def __init__(self, ne: float):
        super().__init__(ne=ne)


class FloatBetween(_FloatComparison):
    def __init__(self, lower: float, upper: float):
        super().__init__(ge=lower, le=upper)


class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
        super().__init__(gt=gt)


class FloatGreaterOrEquals(_FloatComparison):
    def __init__(self, ge: float):
        super().__init__(ge=ge)


class FloatLessThan(_FloatComparison):
    def __init__(self, lt):
        super().__init__(lt=lt)


class FloatLessOrEquals(_FloatComparison):
    def __init__(self, le):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
def __init__(self, lt):
        super().__init__(lt=lt)


class IntLessOrEquals(_IntComparison):
    def __init__(self, le):
        super().__init__(le=le)


# floats
class AnyFloat(_FloatComparison):
    def __init__(self):
        super().__init__()


class NotThisFloat(_FloatComparison):
    def __init__(self, ne: float):
        super().__init__(ne=ne)


class FloatBetween(_FloatComparison):
    def __init__(self, lower: float, upper: float):
        super().__init__(ge=lower, le=upper)


class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
        super().__init__(gt=gt)


class FloatGreaterOrEquals(_FloatComparison):
    def __init__(self, ge: float):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class FloatGreaterThan(_FloatComparison):
    def __init__(self, gt: float):
        super().__init__(gt=gt)


class FloatGreaterOrEquals(_FloatComparison):
    def __init__(self, ge: float):
        super().__init__(ge=ge)


class FloatLessThan(_FloatComparison):
    def __init__(self, lt):
        super().__init__(lt=lt)


class FloatLessOrEquals(_FloatComparison):
    def __init__(self, le):
        super().__init__(le=le)


# strings


class AnyStr(_RichComparison):
    def __init__(self):
        super().__init__(klass=str)


class RegexMatches(Matcher):
    """
    Compares true if other mathes given regex.
    """