Skip to main content
Log in

Mojo function

assert_is_not

assert_is_not[T: StringableIdentifiable](lhs: T, rhs: T, msg: String = "", *, location: Optional[_SourceLocation] = #kgen.none)

Asserts that the input values have different identities. If they do not then an Error is raised.

Parameters:

  • ​T (StringableIdentifiable): A StringableIdentifiable type.

Args:

  • ​lhs (T): The lhs of the is not statement.
  • ​rhs (T): The rhs of the is not statement.
  • ​msg (String): The message to be printed if the assertion fails.
  • ​location (Optional[_SourceLocation]): The location of the error (default to the __call_location).

Raises:

An Error with the provided message if assert fails and None otherwise.

Was this page helpful?