• Home
  • Raw
  • Download

Lines Matching refs:docstrings

5    :synopsis: Test pieces of code within docstrings.
20 * To check that a module's docstrings are up-to-date by verifying that all
152 :mod:`!doctest` then examines docstrings in module :mod:`!M`.
154 Running the module as a script causes the examples in the docstrings to get
264 This section examines in detail how doctest works: which docstrings it looks at,
272 .. _doctest-which-docstrings:
277 The module docstring, and all function, class and method docstrings are
285 Function and class object docstrings found from ``M.__test__`` are searched, and
286 strings are treated as if they were docstrings. In output, a key ``K`` in
307 searches them recursively for docstrings, which are then scanned for tests.
309 Any classes found are recursively searched similarly, to test docstrings in
411 docstrings.
943 Test examples in docstrings in functions and classes reachable from module *m*
949 strings; function and class docstrings are searched for examples; strings are
950 searched directly, as if they were docstrings.
952 Only docstrings attached to objects belonging to module *m* are searched.
1115 contains no docstrings instead of raising :exc:`ValueError`.
1191 * :class:`DocTestFinder`: Finds all docstrings in a given module, and uses a
1345 a given object, from its docstring and the docstrings of its contained objects.
1353 drop-in replacement) that is used to extract doctests from docstrings.
1359 :meth:`DocTestFinder.find` will include tests for objects with empty docstrings.
1368 docstring, or by any of its contained objects' docstrings.
1869 #. Checking examples in docstrings.
1876 In particular, filling your docstrings with obscure test cases makes for bad
1913 * Define functions named ``_regrtest_topic`` that consist of single docstrings,
1918 docstrings containing test cases.