2. Python Beyond BasicsIV. Testing And Quality32. DoctestsOn this page32. Doctests Doctests let you embed tests in docstrings. Example def add(a, b): """ >>> add(2, 3) 5 """ return a + bif __name__ == "__main__": import doctest doctest.testmod() Wrap-Up Doctests are lightweight tests that double as documentation.