How to use the testslide.matchers._IntComparison 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 _IntComparison(_RichComparison):
    """
    Compares true if other number passes all rich comparison cases given.
    """

    def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
        super().__init__(int, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)


# Ints
class AnyInt(_IntComparison):
    def __init__(self):
        super().__init__()


class NotThisInt(_IntComparison):
    def __init__(self, ne: int):
        super().__init__(ne=ne)


class IntBetween(_IntComparison):
    def __init__(self, lower: int, upper: int):
        super().__init__(ge=lower, le=upper)


class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
        super().__init__(gt=gt)


class IntGreaterOrEquals(_IntComparison):
    def __init__(self, ge: int):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
        super().__init__(int, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)


# Ints
class AnyInt(_IntComparison):
    def __init__(self):
        super().__init__()


class NotThisInt(_IntComparison):
    def __init__(self, ne: int):
        super().__init__(ne=ne)


class IntBetween(_IntComparison):
    def __init__(self, lower: int, upper: int):
        super().__init__(ge=lower, le=upper)


class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
        super().__init__(gt=gt)


class IntGreaterOrEquals(_IntComparison):
    def __init__(self, ge: int):
        super().__init__(ge=ge)


class IntLessThan(_IntComparison):
    def __init__(self, lt):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class AnyInt(_IntComparison):
    def __init__(self):
        super().__init__()


class NotThisInt(_IntComparison):
    def __init__(self, ne: int):
        super().__init__(ne=ne)


class IntBetween(_IntComparison):
    def __init__(self, lower: int, upper: int):
        super().__init__(ge=lower, le=upper)


class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
        super().__init__(gt=gt)


class IntGreaterOrEquals(_IntComparison):
    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):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class IntBetween(_IntComparison):
    def __init__(self, lower: int, upper: int):
        super().__init__(ge=lower, le=upper)


class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
        super().__init__(gt=gt)


class IntGreaterOrEquals(_IntComparison):
    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):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class NotThisInt(_IntComparison):
    def __init__(self, ne: int):
        super().__init__(ne=ne)


class IntBetween(_IntComparison):
    def __init__(self, lower: int, upper: int):
        super().__init__(ge=lower, le=upper)


class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
        super().__init__(gt=gt)


class IntGreaterOrEquals(_IntComparison):
    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):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
        super().__init__(float, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)


class _IntComparison(_RichComparison):
    """
    Compares true if other number passes all rich comparison cases given.
    """

    def __init__(self, lt=None, le=None, eq=None, ne=None, ge=None, gt=None):
        super().__init__(int, lt=lt, le=le, eq=eq, ne=ne, ge=ge, gt=gt)


# Ints
class AnyInt(_IntComparison):
    def __init__(self):
        super().__init__()


class NotThisInt(_IntComparison):
    def __init__(self, ne: int):
        super().__init__(ne=ne)


class IntBetween(_IntComparison):
    def __init__(self, lower: int, upper: int):
        super().__init__(ge=lower, le=upper)


class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
github facebookincubator / TestSlide / testslide / matchers.py View on Github external
class IntGreaterThan(_IntComparison):
    def __init__(self, gt: int):
        super().__init__(gt=gt)


class IntGreaterOrEquals(_IntComparison):
    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):