Lines Matching refs:DocTest
67 # 2. Example & DocTest
69 'DocTest',
112 # - DocTest: a collection of examples, parsed from a docstring, plus
116 # - DocTestRunner: runs DocTest cases, and accumulates statistics.
122 # |object| --DocTestFinder-> | DocTest | --DocTestRunner-> |results|
170 # 2. Example & DocTest -- store test cases
171 # 3. DocTest Parser -- extracts examples from strings
172 # 4. DocTest Finder -- extracts test cases from objects
173 # 5. DocTest Runner -- runs test cases
426 ## 2. Example & DocTest
434 ## a string (such as an object's docstring). The DocTest class also
458 - lineno: The line number within the DocTest string containing
460 zero-based, with respect to the beginning of the DocTest.
462 - indent: The example's indentation in the DocTest string.
505 class DocTest:
508 namespace. Each `DocTest` defines the following attributes:
515 - name: A name identifying the DocTest (typically, the name of
516 the object whose docstring this DocTest was extracted from).
518 - filename: The name of the file that this DocTest was extracted
521 - lineno: The line number within filename where this DocTest
531 Create a new DocTest containing the given examples. The
532 DocTest's globals are initialized with a copy of `globs`.
535 "DocTest no longer accepts str; use DocTestParser instead"
570 if not isinstance(other, DocTest):
670 collect them into a `DocTest` object.
673 the new `DocTest` object. See the documentation for `DocTest`
676 return DocTest(self.get_examples(string, name), globs,
812 ## 4. DocTest Finder
830 function that should be used to create new DocTest objects (or
831 objects that implement the same interface as DocTest). The
833 of the DocTest constructor.
872 The globals for each DocTest is formed by combining `globs`
875 for each DocTest. If `globs` is not specified, then it
1051 Return a DocTest for the given object, if it defines a docstring;
1076 # Return a DocTest for this object.
1140 ## 5. DocTest Runner
1145 A class used to run DocTest test cases, and accumulate statistics.
1146 The `run` method is used to process a single DocTest case. It
1291 # DocTest Running
1421 Record the fact that the given DocTest (`test`) generated `f`
1730 """A DocTest example has failed in debugging mode.
1734 - test: the DocTest object being run
1749 """A DocTest example has encountered an unexpected exception
1753 - test: the DocTest object being run
1838 doctest.UnexpectedException: <DocTest foo from foo.py:0 (2 examples)>
2377 tests in each file. The setUp function will be passed a DocTest
2383 tests in each file. The tearDown function will be passed a DocTest
2493 tests in each file. The setUp function will be passed a DocTest
2499 tests in each file. The tearDown function will be passed a DocTest