Python · Module
pytest
Python's unittest module helps automate tests, reuse setup and cleanup, group tests, and report results. Tests usually subclass unittest.TestCase and use methods whose names start with test.
Last updated
Syntax
class TestName(unittest.TestCase):
def test_name(self):
...In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
unittest.TestCaseunittest.mainassertEqualassertTrueassertFalseassertRaises