• Home
  • Raw
  • Download

Lines Matching refs:docstrings

7    :synopsis: Test pieces of code within docstrings.
18 * To check that a module's docstrings are up-to-date by verifying that all
162 :mod:`doctest` then examines docstrings in module :mod:`M`.
164 Running the module as a script causes the examples in the docstrings to get
276 This section examines in detail how doctest works: which docstrings it looks at,
284 .. _doctest-which-docstrings:
289 The module docstring, and all function, class and method docstrings are
294 Function and class object docstrings found from ``M.__test__`` are searched, and
295 strings are treated as if they were docstrings. In output, a key ``K`` in
300 Any classes found are recursively searched similarly, to test docstrings in
407 docstrings.
925 Test examples in docstrings in functions and classes reachable from module *m*
931 strings; function and class docstrings are searched for examples; strings are
932 searched directly, as if they were docstrings.
934 Only docstrings attached to objects belonging to module *m* are searched.
1085 a :exc:`ValueError` if *module* contains no docstrings. You can prevent
1197 * :class:`DocTestFinder`: Finds all docstrings in a given module, and uses a
1352 a given object, from its docstring and the docstrings of its contained objects.
1361 drop-in replacement) that is used to extract doctests from docstrings.
1367 :meth:`DocTestFinder.find` will include tests for objects with empty docstrings.
1377 docstring, or by any of its contained objects' docstrings.
1855 #. Checking examples in docstrings.
1862 In particular, filling your docstrings with obscure test cases makes for bad
1899 * Define functions named ``_regrtest_topic`` that consist of single docstrings,
1904 docstrings containing test cases.