| |
| Pass one or more paths (as strings) to text files to be examined. |
| |
| Options may be provided as keyword arguments: |
| |
| Optional argument *module_relative* specifies how the filenames in *paths* |
| should be interpreted: |
| |
n | * If *module_relative* is ``True`` (the default), then each filename specifies |
n | * If *module_relative* is ``True`` (the default), then each filename in |
| an OS-independent module-relative path. By default, this path is relative to |
| *paths* specifies an OS-independent module-relative path. By default, this |
| the calling module's directory; but if the *package* argument is specified, then |
| path is relative to the calling module's directory; but if the *package* |
| it is relative to that package. To ensure OS-independence, each filename should |
| argument is specified, then it is relative to that package. To ensure |
| use ``/`` characters to separate path segments, and may not be an absolute path |
| OS-independence, each filename should use ``/`` characters to separate path |
| (i.e., it may not begin with ``/``). |
| segments, and may not be an absolute path (i.e., it may not begin with |
| ``/``). |
| |
n | * If *module_relative* is ``False``, then each filename specifies an OS-specific |
n | * If *module_relative* is ``False``, then each filename in *paths* specifies |
| path. The path may be absolute or relative; relative paths are resolved with |
| an OS-specific path. The path may be absolute or relative; relative paths |
| respect to the current working directory. |
| are resolved with respect to the current working directory. |
| |
n | Optional argument *package* is a Python package or the name of a Python package |
n | Optional argument *package* is a Python package or the name of a Python |
| package whose directory should be used as the base directory for |
| module-relative filenames in *paths*. If no package is specified, then the |
| whose directory should be used as the base directory for module-relative |
| calling module's directory is used as the base directory for module-relative |
| filenames. If no package is specified, then the calling module's directory is |
| filenames. It is an error to specify *package* if *module_relative* is |
| used as the base directory for module-relative filenames. It is an error to |
| ``False``. |
| specify *package* if *module_relative* is ``False``. |
| |
n | Optional argument *setUp* specifies a set-up function for the test suite. This |
n | Optional argument *setUp* specifies a set-up function for the test suite. |
| is called before running the tests in each file. The *setUp* function will be |
| This is called before running the tests in each file. The *setUp* function |
| passed a :class:`DocTest` object. The setUp function can access the test |
| globals as the *globs* attribute of the test passed. |
| |
| Optional argument *tearDown* specifies a tear-down function for the test suite. |
| This is called after running the tests in each file. The *tearDown* function |
| will be passed a :class:`DocTest` object. The setUp function can access the |
| test globals as the *globs* attribute of the test passed. |
n | |
| Optional argument *tearDown* specifies a tear-down function for the test |
| suite. This is called after running the tests in each file. The *tearDown* |
| function will be passed a :class:`DocTest` object. The setUp function can |
| access the test globals as the *globs* attribute of the test passed. |
| |
| Optional argument *globs* is a dictionary containing the initial global |
| variables for the tests. A new copy of this dictionary is created for each |
| test. By default, *globs* is a new empty dictionary. |
| |
| Optional argument *optionflags* specifies the default doctest options for the |
| tests, created by or-ing together individual option flags. See section |
n | :ref:`doctest-options`. See function :func:`set_unittest_reportflags` below for |
n | :ref:`doctest-options`. See function :func:`set_unittest_reportflags` below |
| a better way to set reporting options. |
| for a better way to set reporting options. |
| |
n | Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) that |
n | Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) |
| should be used to extract tests from the files. It defaults to a normal parser |
| that should be used to extract tests from the files. It defaults to a normal |
| (i.e., ``DocTestParser()``). |
| parser (i.e., ``DocTestParser()``). |
| |
| Optional argument *encoding* specifies an encoding that should be used to |
| convert the file to unicode. |
| |
| .. versionadded:: 2.4 |
| |
| .. versionchanged:: 2.5 |
n | The global ``__file__`` was added to the globals provided to doctests loaded |
n | The global ``__file__`` was added to the globals provided to doctests |
| from a text file using :func:`DocFileSuite`. |
| loaded from a text file using :func:`DocFileSuite`. |
| |
| .. versionchanged:: 2.5 |
| The parameter *encoding* was added. |
| |
| |
| .. function:: DocTestSuite([module][, globs][, extraglobs][, test_finder][, setUp][, tearDown][, checker]) |
| |
| Convert doctest tests for a module to a :class:`unittest.TestSuite`. |
| .. class:: DocTest(examples, globs, name, filename, lineno, docstring) |
| |
| A collection of doctest examples that should be run in a single namespace. The |
| constructor arguments are used to initialize the member variables of the same |
| names. |
| |
| .. versionadded:: 2.4 |
| |
n | :class:`DocTest` defines the following member variables. They are initialized |
n | :class:`DocTest` defines the following member variables. They are initialized by |
| by the constructor, and should not be modified directly. |
| the constructor, and should not be modified directly. |
| |
| |
n | .. attribute:: DocTest.examples |
n | .. attribute:: examples |
| |
n | A list of :class:`Example` objects encoding the individual interactive Python |
n | A list of :class:`Example` objects encoding the individual interactive Python |
| examples that should be run by this test. |
| examples that should be run by this test. |
| |
| |
n | .. attribute:: DocTest.globs |
n | .. attribute:: globs |
| |
n | The namespace (aka globals) that the examples should be run in. This is a |
n | The namespace (aka globals) that the examples should be run in. This is a |
| dictionary mapping names to values. Any changes to the namespace made by the |
| dictionary mapping names to values. Any changes to the namespace made by the |
| examples (such as binding new variables) will be reflected in :attr:`globs` |
| examples (such as binding new variables) will be reflected in :attr:`globs` |
| after the test is run. |
| after the test is run. |
| |
| |
n | .. attribute:: DocTest.name |
n | .. attribute:: name |
| |
n | A string name identifying the :class:`DocTest`. Typically, this is the name of |
n | A string name identifying the :class:`DocTest`. Typically, this is the name |
| the object or file that the test was extracted from. |
| of the object or file that the test was extracted from. |
| |
| |
n | .. attribute:: DocTest.filename |
n | .. attribute:: filename |
| |
n | The name of the file that this :class:`DocTest` was extracted from; or ``None`` |
n | The name of the file that this :class:`DocTest` was extracted from; or |
| if the filename is unknown, or if the :class:`DocTest` was not extracted from a |
| ``None`` if the filename is unknown, or if the :class:`DocTest` was not |
| file. |
| extracted from a file. |
| |
| |
n | .. attribute:: DocTest.lineno |
n | .. attribute:: lineno |
| |
n | The line number within :attr:`filename` where this :class:`DocTest` begins, or |
n | The line number within :attr:`filename` where this :class:`DocTest` begins, or |
| ``None`` if the line number is unavailable. This line number is zero-based with |
| ``None`` if the line number is unavailable. This line number is zero-based |
| respect to the beginning of the file. |
| with respect to the beginning of the file. |
| |
| |
n | .. attribute:: DocTest.docstring |
n | .. attribute:: docstring |
| |
n | The string that the test was extracted from, or 'None' if the string is |
n | The string that the test was extracted from, or 'None' if the string is |
| unavailable, or if the test was not extracted from a string. |
| unavailable, or if the test was not extracted from a string. |
| |
| |
| .. _doctest-example: |
| |
| Example Objects |
| ^^^^^^^^^^^^^^^ |
| |
| |
| .. class:: Example(source, want[, exc_msg][, lineno][, indent][, options]) |
| |
| A single interactive example, consisting of a Python statement and its expected |
| output. The constructor arguments are used to initialize the member variables |
| of the same names. |
| |
| .. versionadded:: 2.4 |
| |
n | :class:`Example` defines the following member variables. They are initialized |
n | :class:`Example` defines the following member variables. They are initialized by |
| by the constructor, and should not be modified directly. |
| the constructor, and should not be modified directly. |
| |
| |
n | .. attribute:: Example.source |
n | .. attribute:: source |
| |
n | A string containing the example's source code. This source code consists of a |
n | A string containing the example's source code. This source code consists of a |
| single Python statement, and always ends with a newline; the constructor adds a |
| single Python statement, and always ends with a newline; the constructor adds |
| newline when necessary. |
| |
| |
| .. attribute:: Example.want |
| |
| The expected output from running the example's source code (either from stdout, |
| or a traceback in case of exception). :attr:`want` ends with a newline unless |
| no output is expected, in which case it's an empty string. The constructor adds |
| a newline when necessary. |
| a newline when necessary. |
| |
| |
n | .. attribute:: want |
| |
| The expected output from running the example's source code (either from |
| stdout, or a traceback in case of exception). :attr:`want` ends with a |
| newline unless no output is expected, in which case it's an empty string. The |
| constructor adds a newline when necessary. |
| |
| |
| .. attribute:: Example.exc_msg |
| .. attribute:: exc_msg |
| |
n | The exception message generated by the example, if the example is expected to |
n | The exception message generated by the example, if the example is expected to |
| generate an exception; or ``None`` if it is not expected to generate an |
| generate an exception; or ``None`` if it is not expected to generate an |
| exception. This exception message is compared against the return value of |
| exception. This exception message is compared against the return value of |
| :func:`traceback.format_exception_only`. :attr:`exc_msg` ends with a newline |
| :func:`traceback.format_exception_only`. :attr:`exc_msg` ends with a newline |
| unless it's ``None``. The constructor adds a newline if needed. |
| unless it's ``None``. The constructor adds a newline if needed. |
| |
| |
n | .. attribute:: Example.lineno |
n | .. attribute:: lineno |
| |
n | The line number within the string containing this example where the example |
n | The line number within the string containing this example where the example |
| begins. This line number is zero-based with respect to the beginning of the |
| begins. This line number is zero-based with respect to the beginning of the |
| containing string. |
| containing string. |
| |
| |
n | .. attribute:: Example.indent |
n | .. attribute:: indent |
| |
n | The example's indentation in the containing string, i.e., the number of space |
n | The example's indentation in the containing string, i.e., the number of space |
| characters that precede the example's first prompt. |
| characters that precede the example's first prompt. |
| |
| |
n | .. attribute:: Example.options |
n | .. attribute:: options |
| |
n | A dictionary mapping from option flags to ``True`` or ``False``, which is used |
n | A dictionary mapping from option flags to ``True`` or ``False``, which is used |
| to override default options for this example. Any option flags not contained in |
| to override default options for this example. Any option flags not contained |
| this dictionary are left at their default value (as specified by the |
| in this dictionary are left at their default value (as specified by the |
| :class:`DocTestRunner`'s :attr:`optionflags`). By default, no options are set. |
| :class:`DocTestRunner`'s :attr:`optionflags`). By default, no options are set. |
| |
| |
| .. _doctest-doctestfinder: |
| |
| DocTestFinder objects |
| ^^^^^^^^^^^^^^^^^^^^^ |
| |
| |
| If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` |
| will only examine the given object, and not any contained objects. |
| |
| If the optional argument *exclude_empty* is false, then |
| :meth:`DocTestFinder.find` will include tests for objects with empty docstrings. |
| |
| .. versionadded:: 2.4 |
| |
n | :class:`DocTestFinder` defines the following method: |
n | :class:`DocTestFinder` defines the following method: |
| |
| |
n | .. method:: DocTestFinder.find(obj[, name][, module][, globs][, extraglobs]) |
n | .. method:: find(obj[, name][, module][, globs][, extraglobs]) |
| |
n | Return a list of the :class:`DocTest`\ s that are defined by *obj*'s docstring, |
n | Return a list of the :class:`DocTest`\ s that are defined by *obj*'s |
| or by any of its contained objects' docstrings. |
| docstring, or by any of its contained objects' docstrings. |
| |
n | The optional argument *name* specifies the object's name; this name will be used |
n | The optional argument *name* specifies the object's name; this name will be |
| to construct names for the returned :class:`DocTest`\ s. If *name* is not |
| used to construct names for the returned :class:`DocTest`\ s. If *name* is |
| specified, then ``obj.__name__`` is used. |
| not specified, then ``obj.__name__`` is used. |
| |
n | The optional parameter *module* is the module that contains the given object. |
n | The optional parameter *module* is the module that contains the given object. |
| If the module is not specified or is None, then the test finder will attempt to |
| If the module is not specified or is None, then the test finder will attempt |
| automatically determine the correct module. The object's module is used: |
| to automatically determine the correct module. The object's module is used: |
| |
n | * As a default namespace, if *globs* is not specified. |
n | * As a default namespace, if *globs* is not specified. |
| |
n | * To prevent the DocTestFinder from extracting DocTests from objects that are |
n | * To prevent the DocTestFinder from extracting DocTests from objects that are |
| imported from other modules. (Contained objects with modules other than |
| imported from other modules. (Contained objects with modules other than |
| *module* are ignored.) |
| *module* are ignored.) |
| |
n | * To find the name of the file containing the object. |
n | * To find the name of the file containing the object. |
| |
n | * To help find the line number of the object within its file. |
n | * To help find the line number of the object within its file. |
| |
n | If *module* is ``False``, no attempt to find the module will be made. This is |
n | If *module* is ``False``, no attempt to find the module will be made. This is |
| obscure, of use mostly in testing doctest itself: if *module* is ``False``, or |
| obscure, of use mostly in testing doctest itself: if *module* is ``False``, or |
| is ``None`` but cannot be found automatically, then all objects are considered |
| is ``None`` but cannot be found automatically, then all objects are considered |
| to belong to the (non-existent) module, so all contained objects will |
| to belong to the (non-existent) module, so all contained objects will |
| (recursively) be searched for doctests. |
| (recursively) be searched for doctests. |
| |
n | The globals for each :class:`DocTest` is formed by combining *globs* and |
n | The globals for each :class:`DocTest` is formed by combining *globs* and |
| *extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new |
| *extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new |
| shallow copy of the globals dictionary is created for each :class:`DocTest`. If |
| shallow copy of the globals dictionary is created for each :class:`DocTest`. |
| *globs* is not specified, then it defaults to the module's *__dict__*, if |
| If *globs* is not specified, then it defaults to the module's *__dict__*, if |
| specified, or ``{}`` otherwise. If *extraglobs* is not specified, then it |
| specified, or ``{}`` otherwise. If *extraglobs* is not specified, then it |
| defaults to ``{}``. |
| defaults to ``{}``. |
| |
| |
| .. _doctest-doctestparser: |
| |
| DocTestParser objects |
| ^^^^^^^^^^^^^^^^^^^^^ |
| |
| |
| .. class:: DocTestParser() |
| |
| A processing class used to extract interactive examples from a string, and use |
| them to create a :class:`DocTest` object. |
| |
| .. versionadded:: 2.4 |
| |
n | :class:`DocTestParser` defines the following methods: |
n | :class:`DocTestParser` defines the following methods: |
| |
| |
n | .. method:: DocTestParser.get_doctest(string, globs, name, filename, lineno) |
n | .. method:: get_doctest(string, globs, name, filename, lineno) |
| |
n | Extract all doctest examples from the given string, and collect them into a |
n | Extract all doctest examples from the given string, and collect them into a |
| :class:`DocTest` object. |
| :class:`DocTest` object. |
| |
n | *globs*, *name*, *filename*, and *lineno* are attributes for the new |
n | *globs*, *name*, *filename*, and *lineno* are attributes for the new |
| :class:`DocTest` object. See the documentation for :class:`DocTest` for more |
| :class:`DocTest` object. See the documentation for :class:`DocTest` for more |
| information. |
| information. |
| |
| |
n | .. method:: DocTestParser.get_examples(string[, name]) |
n | .. method:: get_examples(string[, name]) |
| |
n | Extract all doctest examples from the given string, and return them as a list of |
n | Extract all doctest examples from the given string, and return them as a list |
| :class:`Example` objects. Line numbers are 0-based. The optional argument |
| of :class:`Example` objects. Line numbers are 0-based. The optional argument |
| *name* is a name identifying this string, and is only used for error messages. |
| *name* is a name identifying this string, and is only used for error messages. |
| |
| |
n | .. method:: DocTestParser.parse(string[, name]) |
n | .. method:: parse(string[, name]) |
| |
n | Divide the given string into examples and intervening text, and return them as a |
n | Divide the given string into examples and intervening text, and return them as |
| list of alternating :class:`Example`\ s and strings. Line numbers for the |
| a list of alternating :class:`Example`\ s and strings. Line numbers for the |
| :class:`Example`\ s are 0-based. The optional argument *name* is a name |
| :class:`Example`\ s are 0-based. The optional argument *name* is a name |
| identifying this string, and is only used for error messages. |
| identifying this string, and is only used for error messages. |
| |
| |
| .. _doctest-doctestrunner: |
| |
| DocTestRunner objects |
| ^^^^^^^^^^^^^^^^^^^^^ |
| |
| |
| iff the command-line switch :option:`-v` is used. |
| |
| The optional keyword argument *optionflags* can be used to control how the test |
| runner compares expected output to actual output, and how it displays failures. |
| For more information, see section :ref:`doctest-options`. |
| |
| .. versionadded:: 2.4 |
| |
n | :class:`DocTestParser` defines the following methods: |
n | :class:`DocTestParser` defines the following methods: |
| |
| |
n | .. method:: DocTestRunner.report_start(out, test, example) |
n | .. method:: report_start(out, test, example) |
| |
n | Report that the test runner is about to process the given example. This method |
n | Report that the test runner is about to process the given example. This method |
| is provided to allow subclasses of :class:`DocTestRunner` to customize their |
| is provided to allow subclasses of :class:`DocTestRunner` to customize their |
| output; it should not be called directly. |
| output; it should not be called directly. |
| |
n | *example* is the example about to be processed. *test* is the test containing |
n | *example* is the example about to be processed. *test* is the test |
| *example*. *out* is the output function that was passed to |
| *containing example*. *out* is the output function that was passed to |
| :meth:`DocTestRunner.run`. |
| :meth:`DocTestRunner.run`. |
| |
| |
n | .. method:: DocTestRunner.report_success(out, test, example, got) |
n | .. method:: report_success(out, test, example, got) |
| |
n | Report that the given example ran successfully. This method is provided to |
n | Report that the given example ran successfully. This method is provided to |
| allow subclasses of :class:`DocTestRunner` to customize their output; it should |
| allow subclasses of :class:`DocTestRunner` to customize their output; it |
| not be called directly. |
| should not be called directly. |
| |
n | *example* is the example about to be processed. *got* is the actual output from |
n | *example* is the example about to be processed. *got* is the actual output |
| the example. *test* is the test containing *example*. *out* is the output |
| from the example. *test* is the test containing *example*. *out* is the |
| function that was passed to :meth:`DocTestRunner.run`. |
| output function that was passed to :meth:`DocTestRunner.run`. |
| |
| |
n | .. method:: DocTestRunner.report_failure(out, test, example, got) |
n | .. method:: report_failure(out, test, example, got) |
| |
n | Report that the given example failed. This method is provided to allow |
n | Report that the given example failed. This method is provided to allow |
| subclasses of :class:`DocTestRunner` to customize their output; it should not be |
| subclasses of :class:`DocTestRunner` to customize their output; it should not |
| called directly. |
| be called directly. |
| |
n | *example* is the example about to be processed. *got* is the actual output from |
n | *example* is the example about to be processed. *got* is the actual output |
| the example. *test* is the test containing *example*. *out* is the output |
| from the example. *test* is the test containing *example*. *out* is the |
| function that was passed to :meth:`DocTestRunner.run`. |
| output function that was passed to :meth:`DocTestRunner.run`. |
| |
| |
n | .. method:: DocTestRunner.report_unexpected_exception(out, test, example, exc_info) |
n | .. method:: report_unexpected_exception(out, test, example, exc_info) |
| |
n | Report that the given example raised an unexpected exception. This method is |
n | Report that the given example raised an unexpected exception. This method is |
| provided to allow subclasses of :class:`DocTestRunner` to customize their |
| provided to allow subclasses of :class:`DocTestRunner` to customize their |
| output; it should not be called directly. |
| output; it should not be called directly. |
| |
n | *example* is the example about to be processed. *exc_info* is a tuple containing |
n | *example* is the example about to be processed. *exc_info* is a tuple |
| information about the unexpected exception (as returned by |
| containing information about the unexpected exception (as returned by |
| :func:`sys.exc_info`). *test* is the test containing *example*. *out* is the |
| :func:`sys.exc_info`). *test* is the test containing *example*. *out* is the |
| output function that was passed to :meth:`DocTestRunner.run`. |
| output function that was passed to :meth:`DocTestRunner.run`. |
| |
| |
n | .. method:: DocTestRunner.run(test[, compileflags][, out][, clear_globs]) |
n | .. method:: run(test[, compileflags][, out][, clear_globs]) |
| |
n | Run the examples in *test* (a :class:`DocTest` object), and display the results |
n | Run the examples in *test* (a :class:`DocTest` object), and display the |
| using the writer function *out*. |
| results using the writer function *out*. |
| |
n | The examples are run in the namespace ``test.globs``. If *clear_globs* is true |
n | The examples are run in the namespace ``test.globs``. If *clear_globs* is |
| (the default), then this namespace will be cleared after the test runs, to help |
| true (the default), then this namespace will be cleared after the test runs, |
| with garbage collection. If you would like to examine the namespace after the |
| to help with garbage collection. If you would like to examine the namespace |
| test completes, then use *clear_globs=False*. |
| after the test completes, then use *clear_globs=False*. |
| |
n | *compileflags* gives the set of flags that should be used by the Python compiler |
n | *compileflags* gives the set of flags that should be used by the Python |
| when running the examples. If not specified, then it will default to the set of |
| compiler when running the examples. If not specified, then it will default to |
| future-import flags that apply to *globs*. |
| the set of future-import flags that apply to *globs*. |
| |
n | The output of each example is checked using the :class:`DocTestRunner`'s output |
n | The output of each example is checked using the :class:`DocTestRunner`'s |
| checker, and the results are formatted by the :meth:`DocTestRunner.report_\*` |
| output checker, and the results are formatted by the |
| methods. |
| :meth:`DocTestRunner.report_\*` methods. |
| |
| |
n | .. method:: DocTestRunner.summarize([verbose]) |
n | .. method:: summarize([verbose]) |
| |
n | Print a summary of all the test cases that have been run by this DocTestRunner, |
n | Print a summary of all the test cases that have been run by this DocTestRunner, |
| and return a tuple ``(failure_count, test_count)``. |
| and return a :term:`named tuple` ``TestResults(failed, attempted)``. |
| |
n | The optional *verbose* argument controls how detailed the summary is. If the |
n | The optional *verbose* argument controls how detailed the summary is. If the |
| verbosity is not specified, then the :class:`DocTestRunner`'s verbosity is used. |
| verbosity is not specified, then the :class:`DocTestRunner`'s verbosity is |
| used. |
| |
| .. versionchanged:: 2.6 |
| Use a named tuple. |
| |
| |
| .. _doctest-outputchecker: |
| |
| OutputChecker objects |
| ^^^^^^^^^^^^^^^^^^^^^ |
| |
| |
| A class used to check the whether the actual output from a doctest example |
| matches the expected output. :class:`OutputChecker` defines two methods: |
| :meth:`check_output`, which compares a given pair of outputs, and returns true |
| if they match; and :meth:`output_difference`, which returns a string describing |
| the differences between two outputs. |
| |
| .. versionadded:: 2.4 |
| |
n | :class:`OutputChecker` defines the following methods: |
n | :class:`OutputChecker` defines the following methods: |
| |
| |
n | .. method:: OutputChecker.check_output(want, got, optionflags) |
n | .. method:: check_output(want, got, optionflags) |
| |
n | Return ``True`` iff the actual output from an example (*got*) matches the |
n | Return ``True`` iff the actual output from an example (*got*) matches the |
| expected output (*want*). These strings are always considered to match if they |
| expected output (*want*). These strings are always considered to match if |
| are identical; but depending on what option flags the test runner is using, |
| they are identical; but depending on what option flags the test runner is |
| several non-exact match types are also possible. See section |
| using, several non-exact match types are also possible. See section |
| :ref:`doctest-options` for more information about option flags. |
| :ref:`doctest-options` for more information about option flags. |
| |
| |
n | .. method:: OutputChecker.output_difference(example, got, optionflags) |
n | .. method:: output_difference(example, got, optionflags) |
| |
n | Return a string describing the differences between the expected output for a |
n | Return a string describing the differences between the expected output for a |
| given example (*example*) and the actual output (*got*). *optionflags* is the |
| given example (*example*) and the actual output (*got*). *optionflags* is the |
| set of option flags used to compare *want* and *got*. |
| set of option flags used to compare *want* and *got*. |
| |
| |
| .. _doctest-debugging: |
| |
| Debugging |
| --------- |
| |
| Doctest provides several mechanisms for debugging doctest examples: |