Thu, 07 Jan 2010 13:50:32 +0000
Updated coverage.py to version 3.2.
--- a/DebugClients/Python/coverage/__init__.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/__init__.py Thu Jan 07 13:50:32 2010 +0000 @@ -9,10 +9,10 @@ __url__ = "http://nedbatchelder.com/code/coverage" -from coverage.control import coverage -from coverage.data import CoverageData -from coverage.cmdline import main, CoverageScript -from coverage.misc import CoverageException +from .control import coverage +from .data import CoverageData +from .cmdline import main, CoverageScript +from .misc import CoverageException # Module-level functions. The original API to this module was based on @@ -80,4 +80,4 @@ # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE # USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. +# DAMAGE. \ No newline at end of file
--- a/DebugClients/Python/coverage/annotate.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/annotate.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,7 +2,7 @@ import os, re -from coverage.report import Reporter +from .report import Reporter class AnnotateReporter(Reporter): """Generate annotated source files showing line coverage. @@ -94,4 +94,4 @@ dest.write('! ') dest.write(line) source.close() - dest.close() + dest.close() \ No newline at end of file
--- a/DebugClients/Python/coverage/cmdline.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/cmdline.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,8 +2,8 @@ import optparse, re, sys -from coverage.execfile import run_python_file -from coverage.misc import CoverageException +from .execfile import run_python_file +from .misc import CoverageException class Opts(object): @@ -592,4 +592,4 @@ _, err, _ = sys.exc_info() print(err) status = ERR - return status + return status \ No newline at end of file
--- a/DebugClients/Python/coverage/codeunit.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/codeunit.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,8 +2,8 @@ import glob, os -from coverage.backward import string_class, StringIO -from coverage.misc import CoverageException +from .backward import string_class, StringIO +from .misc import CoverageException def code_unit_factory(morfs, file_locator, omit_prefixes=None): @@ -141,4 +141,4 @@ # Couldn't find source. raise CoverageException( "No source for code %r." % self.filename - ) + ) \ No newline at end of file
--- a/DebugClients/Python/coverage/collector.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/collector.py Thu Jan 07 13:50:32 2010 +0000 @@ -4,7 +4,7 @@ try: # Use the C extension code when we can, for speed. - from coverage.tracer import Tracer + from .tracer import Tracer except ImportError: # Couldn't import the C extension, maybe it isn't built. Tracer = None @@ -270,4 +270,4 @@ if self.branch: return self.data else: - return {} + return {} \ No newline at end of file
--- a/DebugClients/Python/coverage/control.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/control.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,23 +2,23 @@ import atexit, os, socket -from coverage.annotate import AnnotateReporter -from coverage.backward import string_class # pylint: disable-msg=W0622 -from coverage.codeunit import code_unit_factory, CodeUnit -from coverage.collector import Collector -from coverage.data import CoverageData -from coverage.files import FileLocator -from coverage.html import HtmlReporter -from coverage.results import Analysis -from coverage.summary import SummaryReporter -from coverage.xmlreport import XmlReporter +from .annotate import AnnotateReporter +from .backward import string_class # pylint: disable-msg=W0622 +from .codeunit import code_unit_factory, CodeUnit +from .collector import Collector +from .data import CoverageData +from .files import FileLocator +from .html import HtmlReporter +from .results import Analysis +from .summary import SummaryReporter +from .xmlreport import XmlReporter class coverage(object): """Programmatic access to Coverage. To use:: - from coverage import coverage + from . import coverage cov = coverage() cov.start() @@ -52,7 +52,7 @@ to the usual statement coverage. """ - from coverage import __version__ + from . import __version__ self.cover_pylib = cover_pylib self.auto_data = auto_data @@ -343,4 +343,4 @@ if re.search("^COV|^PY", k) ]), ] - return info + return info \ No newline at end of file
--- a/DebugClients/Python/coverage/data.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/data.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,7 +2,7 @@ import os -from coverage.backward import pickle, sorted # pylint: disable-msg=W0622 +from .backward import pickle, sorted # pylint: disable-msg=W0622 class CoverageData(object): @@ -247,4 +247,4 @@ fname = sys.argv[1] else: fname = covdata.filename - pprint.pprint(covdata.raw_data(fname)) + pprint.pprint(covdata.raw_data(fname)) \ No newline at end of file
--- a/DebugClients/Python/coverage/execfile.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/execfile.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,8 +2,8 @@ import imp, os, sys -from coverage.backward import exec_function -from coverage.misc import NoSource +from .backward import exec_function +from .misc import NoSource try: @@ -47,4 +47,4 @@ # Restore the old argv and path sys.argv = old_argv - sys.path[0] = old_path0 + sys.path[0] = old_path0 \ No newline at end of file
--- a/DebugClients/Python/coverage/html.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/html.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,10 +2,10 @@ import os, re, shutil -from coverage import __url__, __version__ # pylint: disable-msg=W0611 -from coverage.phystokens import source_token_lines -from coverage.report import Reporter -from coverage.templite import Templite +from . import __url__, __version__ # pylint: disable-msg=W0611 +from .phystokens import source_token_lines +from .report import Reporter +from .templite import Templite # Disable pylint msg W0612, because a bunch of variables look unused, but # they're accessed in a templite context via locals(). @@ -179,4 +179,4 @@ """ html = re.sub(">\s+<p ", ">\n<p ", html) - return html + return html \ No newline at end of file
--- a/DebugClients/Python/coverage/parser.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/parser.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,9 +2,9 @@ import glob, opcode, os, re, sys, token, tokenize -from coverage.backward import set, sorted, StringIO # pylint: disable-msg=W0622 -from coverage.bytecode import ByteCodes, CodeObjects -from coverage.misc import nice_pair, CoverageException, NoSource, expensive +from .backward import set, sorted, StringIO # pylint: disable-msg=W0622 +from .bytecode import ByteCodes, CodeObjects +from .misc import nice_pair, CoverageException, NoSource, expensive class CodeParser(object): @@ -741,4 +741,4 @@ return arc_width, arc_chars if __name__ == '__main__': - AdHocMain().main(sys.argv[1:]) + AdHocMain().main(sys.argv[1:]) \ No newline at end of file
--- a/DebugClients/Python/coverage/phystokens.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/phystokens.py Thu Jan 07 13:50:32 2010 +0000 @@ -1,7 +1,7 @@ """Better tokenizing for coverage.py.""" import keyword, re, token, tokenize -from coverage.backward import StringIO # pylint: disable-msg=W0622 +from .backward import StringIO # pylint: disable-msg=W0622 def phys_tokens(toks): """Return all physical tokens, even line continuations. @@ -104,4 +104,4 @@ col = ecol if line: - yield line + yield line \ No newline at end of file
--- a/DebugClients/Python/coverage/report.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/report.py Thu Jan 07 13:50:32 2010 +0000 @@ -1,8 +1,8 @@ """Reporter foundation for Coverage.""" import os -from coverage.codeunit import code_unit_factory -from coverage.misc import CoverageException, NoSource +from .codeunit import code_unit_factory +from .misc import CoverageException, NoSource class Reporter(object): """A base class for all reporters.""" @@ -57,4 +57,4 @@ report_fn(cu, self.coverage._analyze(cu)) except NoSource: if not self.ignore_errors: - raise + raise \ No newline at end of file
--- a/DebugClients/Python/coverage/results.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/results.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,9 +2,9 @@ import os -from coverage.backward import set, sorted # pylint: disable-msg=W0622 -from coverage.misc import format_lines, NoSource -from coverage.parser import CodeParser +from .backward import set, sorted # pylint: disable-msg=W0622 +from .misc import format_lines, NoSource +from .parser import CodeParser class Analysis(object): @@ -172,4 +172,4 @@ # Implementing 0+Numbers allows us to sum() a list of Numbers. if other == 0: return self - raise NotImplemented + raise NotImplemented \ No newline at end of file
--- a/DebugClients/Python/coverage/summary.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/summary.py Thu Jan 07 13:50:32 2010 +0000 @@ -2,8 +2,8 @@ import sys -from coverage.report import Reporter -from coverage.results import Numbers +from .report import Reporter +from .results import Numbers class SummaryReporter(Reporter): @@ -73,4 +73,4 @@ args += (total.pc_covered,) if self.show_missing: args += ("",) - outfile.write(fmt_coverage % args) + outfile.write(fmt_coverage % args) \ No newline at end of file
--- a/DebugClients/Python/coverage/xmlreport.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python/coverage/xmlreport.py Thu Jan 07 13:50:32 2010 +0000 @@ -3,9 +3,9 @@ import os, sys, time import xml.dom.minidom -from coverage import __url__, __version__ -from coverage.backward import sorted # pylint: disable-msg=W0622 -from coverage.report import Reporter +from . import __url__, __version__ +from .backward import sorted # pylint: disable-msg=W0622 +from .report import Reporter def rate(hit, num): """Return the fraction of `hit`/`num`.""" @@ -143,4 +143,4 @@ package[1] += class_hits package[2] += class_lines package[3] += class_branch_hits - package[4] += class_branches + package[4] += class_branches \ No newline at end of file
--- a/DebugClients/Python3/coverage/control.py Thu Jan 07 13:42:51 2010 +0000 +++ b/DebugClients/Python3/coverage/control.py Thu Jan 07 13:50:32 2010 +0000 @@ -18,7 +18,7 @@ To use:: - from coverage import coverage + from . import coverage cov = coverage() cov.start() @@ -52,7 +52,7 @@ to the usual statement coverage. """ - from coverage import __version__ + from . import __version__ self.cover_pylib = cover_pylib self.auto_data = auto_data