Index: Doc/library/trace.rst =================================================================== --- Doc/library/trace.rst (revision 82838) +++ Doc/library/trace.rst (working copy) @@ -94,7 +94,8 @@ .. method:: Trace.run(cmd) - Run *cmd* under control of the Trace object with the current tracing parameters. + Run *cmd* under control of the Trace object with the current tracing parameters. + *cmd* must be a string or code object, suitable for passing into :func:`exec`. .. method:: Trace.runctx(cmd, globals=None, locals=None) @@ -109,6 +110,30 @@ Call *func* with the given arguments under control of the :class:`Trace` object with the current tracing parameters. +.. method:: Trace.results() + + Return a :class:`CoverageResults` object that contains the cumulative results + of all previous calls to ``run``, ``runctx`` and ``runfunc`` for the given + :class:`Trace` instance. Does not reset the accumulated trace results. + +.. class:: CoverageResults + + A container for coverage results, created by :meth:`Trace.results`. Should not + be created directly by the user. + +.. method:: CoverageResults.update(other) + + Merge in data from another :class:`CoverageResults` object. + +.. method:: CoverageResults.write_results(show_missing=True, summary=False, coverdir=None) + + Write coverage results. Set *show_missing* to show lines that had no hits. + Set *summary* to include in the output the coverage summary per module. *coverdir* + specifies the directory into which the coverage result files will be output. + If ``None``, the results for each source file are placed in its directory. + +.. + This is a simple example showing the use of this module:: import sys