module
testing
Implements various testing utils.
You can import these APIs from the testing
package. For example:
from testing import assert_true
Structs
-
assert_raises
: Context manager that asserts that the block raises an exception.
Traits
-
Testable
: A trait that a struct should conform to if we do equality testing on it.
Functions
-
assert_true
: Asserts that the input value is True. If it is not then an Error is raised. -
assert_false
: Asserts that the input value is False. If it is not then an Error is raised. -
assert_equal
: Asserts that the input values are equal. If it is not then an Error is raised. -
assert_not_equal
: Asserts that the input values are not equal. If it is not then an Error is raised. -
assert_almost_equal
: Asserts that the input values are equal up to a tolerance. If it is not then an Error is raised.