ID EN
Unittest

assertListEqual

Python 3.11

Tests that two lists or tuples are equal. If not, an error message is constructed that shows only the differences between the two. An error is also raised if either of the parameters are of the wrong type. These methods are used by default when comparing lists or tuples with assertEqual().

Syntax

PYTHON
assertListEqual(first, second, msg=None)

See Also

assertEqual()