Reference

Assert

Assert equal

Input The actual value and the expected value.
Output True if the two values are equal. Throws an assertion error otherwise.

Signature

Example

Assert not equal

Input The actual value and the value it must differ from.
Output True if the two values differ. Throws an assertion error otherwise.

Signature

Example

Assert true

Input A boolean condition.
Output True if the condition is true. Throws an assertion error otherwise.

Signature

Example

Assert false

Input A boolean condition.
Output True if the condition is false. Throws an assertion error otherwise.

Signature

Example

Assert throws

Input An expression expected to raise an error.
Output True if evaluating the expression raises a runtime error. Throws an assertion error otherwise.

Signature

Example