Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert types.is_int(1)
assert not types.is_int("foo")
assert types.is_bool(True)
assert not types.is_bool(1)
assert not types.is_bool("true")
assert types.is_float(1.0)
assert not types.is_float("foo")
assert types.is_number(1)
assert types.is_number(1.0)
assert not types.is_number("foo")
assert types.is_text("foo")
assert types.is_text(1)
assert types.is_text(1.0)
assert not types.is_text([])
assert not types.is_text(True)
assert types.is_any("foo")
assert types.is_any(True)
assert types.is_any(1)
assert types.is_any(1.0)
assert types.is_any({})
assert types.is_any([])
assert types.is_enum("foo")
assert not types.is_enum(1)
assert types.is_none(None)
assert types.is_int(1)
assert not types.is_int("foo")
assert types.is_bool(True)
assert not types.is_bool(1)
assert not types.is_bool("true")
assert types.is_float(1.0)
assert not types.is_float("foo")
assert types.is_number(1)
assert types.is_number(1.0)
assert not types.is_number("foo")
assert types.is_text("foo")
assert types.is_text(1)
assert types.is_text(1.0)
assert not types.is_text([])
assert not types.is_text(True)
assert types.is_any("foo")
assert types.is_any(True)
assert types.is_any(1)
assert types.is_any(1.0)
assert types.is_any({})
assert types.is_any([])
assert types.is_enum("foo")
assert not types.is_enum(1)
assert types.is_none(None)
assert not types.is_none("foo")
assert types.is_bool(True)
assert not types.is_bool(1)
assert not types.is_bool("true")
assert types.is_float(1.0)
assert not types.is_float("foo")
assert types.is_number(1)
assert types.is_number(1.0)
assert not types.is_number("foo")
assert types.is_text("foo")
assert types.is_text(1)
assert types.is_text(1.0)
assert not types.is_text([])
assert not types.is_text(True)
assert types.is_any("foo")
assert types.is_any(True)
assert types.is_any(1)
assert types.is_any(1.0)
assert types.is_any({})
assert types.is_any([])
assert types.is_enum("foo")
assert not types.is_enum(1)
assert types.is_none(None)
assert not types.is_none("foo")
assert not types.is_int("foo")
assert types.is_bool(True)
assert not types.is_bool(1)
assert not types.is_bool("true")
assert types.is_float(1.0)
assert not types.is_float("foo")
assert types.is_number(1)
assert types.is_number(1.0)
assert not types.is_number("foo")
assert types.is_text("foo")
assert types.is_text(1)
assert types.is_text(1.0)
assert not types.is_text([])
assert not types.is_text(True)
assert types.is_any("foo")
assert types.is_any(True)
assert types.is_any(1)
assert types.is_any(1.0)
assert types.is_any({})
assert types.is_any([])
assert types.is_enum("foo")
assert not types.is_enum(1)
assert types.is_none(None)
assert not types.is_none("foo")
assert types.is_bool(True)
assert not types.is_bool(1)
assert not types.is_bool("true")
assert types.is_float(1.0)
assert not types.is_float("foo")
assert types.is_number(1)
assert types.is_number(1.0)
assert not types.is_number("foo")
assert types.is_text("foo")
assert types.is_text(1)
assert types.is_text(1.0)
assert not types.is_text([])
assert not types.is_text(True)
assert types.is_any("foo")
assert types.is_any(True)
assert types.is_any(1)
assert types.is_any(1.0)
assert types.is_any({})
assert types.is_any([])
assert types.is_enum("foo")
assert not types.is_enum(1)
assert types.is_none(None)
assert not types.is_none("foo")