From a5bc551f78df166a0d0e272fae7a7b5205b416f7 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 3 Jan 2010 10:23:06 -0500 Subject: Parallel mode can be set from the .coveragerc file. --- coverage/misc.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'coverage/misc.py') diff --git a/coverage/misc.py b/coverage/misc.py index 0e6bcf9..4959efe 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -60,6 +60,14 @@ def expensive(fn): return _wrapped +def bool_or_none(b): + """Return bool(b), but preserve None.""" + if b is None: + return None + else: + return bool(b) + + class CoverageException(Exception): """An exception specific to Coverage.""" pass -- cgit v1.2.1 From f70090edc42512d8c50d9629867645fff552b775 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 19 Feb 2010 23:08:48 -0500 Subject: If the product code throws an exception, 'coverage run' now produces the same traceback as 'python' would, without the coverage-internal frames distracting from your code. --- coverage/misc.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'coverage/misc.py') diff --git a/coverage/misc.py b/coverage/misc.py index 4959efe..4218536 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -75,3 +75,11 @@ class CoverageException(Exception): class NoSource(CoverageException): """Used to indicate we couldn't find the source for a module.""" pass + +class ExceptionDuringRun(CoverageException): + """An exception happened while running customer code. + + Construct it with three arguments, the values from `sys.exc_info`. + + """ + pass -- cgit v1.2.1