logo

Polyglot CheatSheet - Testing

Last Updated: 2022-04-04

Python

Use unittest Unit testing framework. http://docs.python.org/library/unittest.html

Use assert for unit testing.

>>> a = 1
>>> assert a == 1
>>> assert a != 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AssertionError