• Home
  • Raw
  • Download

Lines Matching refs:docstrings

7    :synopsis: Test pieces of code within docstrings.
22 * To check that a module's docstrings are up-to-date by verifying that all
154 :mod:`doctest` then examines docstrings in module :mod:`M`.
156 Running the module as a script causes the examples in the docstrings to get
266 This section examines in detail how doctest works: which docstrings it looks at,
274 .. _doctest-which-docstrings:
279 The module docstring, and all function, class and method docstrings are
284 Function and class object docstrings found from ``M.__test__`` are searched, and
285 strings are treated as if they were docstrings. In output, a key ``K`` in
290 Any classes found are recursively searched similarly, to test docstrings in
394 docstrings.
914 Test examples in docstrings in functions and classes reachable from module *m*
920 strings; function and class docstrings are searched for examples; strings are
921 searched directly, as if they were docstrings.
923 Only docstrings attached to objects belonging to module *m* are searched.
1083 contains no docstrings instead of raising :exc:`ValueError`.
1154 * :class:`DocTestFinder`: Finds all docstrings in a given module, and uses a
1307 a given object, from its docstring and the docstrings of its contained objects.
1315 drop-in replacement) that is used to extract doctests from docstrings.
1321 :meth:`DocTestFinder.find` will include tests for objects with empty docstrings.
1330 docstring, or by any of its contained objects' docstrings.
1788 #. Checking examples in docstrings.
1795 In particular, filling your docstrings with obscure test cases makes for bad
1832 * Define functions named ``_regrtest_topic`` that consist of single docstrings,
1837 docstrings containing test cases.