[issue11572] bring Lib/copy.py to 100% coverage

Alexander Belopolsky report at bugs.python.org
Fri Mar 18 01:30:17 CET 2011


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Thu, Mar 17, 2011 at 8:03 PM, Antoine Pitrou <report at bugs.python.org> wrote:
..
> +1 for not having pragma statements in the stdlib, especially when they target a third-party tool few of us know and use.

"#pragma NO COVER" is recognized by stdlib trace module, so it is not
specific to a third-party tool.  I don't like #pragma myself.  This is
very "unpythonic" choice.  I would be much happier if it was simply '#
NO COVER' or something even less conspicuous.  I do believe, however
that some mechanism should be used to prevent trace from highlighting
spurious lines as lacking coverage.

> Beside, while coverage measurements are useful, trusting them that actual coverage is complete is IMO a bit foolish.
> It's not just about running every line of code.

Agree, but running every line of code is a good first step.  For
example, it is *very* useful for identifying lack of coverage for
error conditions.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11572>
_______________________________________


More information about the Python-bugs-list mailing list