On 24/10/2013 21:54, Ben Finney wrote:
Terry Reedy <tjre...@udel.edu> writes:

On 10/24/2013 1:46 PM, Ned Batchelder wrote:
It's been fun dropping the contortions for coverage.py 4.x, though!

One request: ignore "if __name__ == '__main__':" clauses at the end of
files, which cannot be run under coverage.py, so 100% coverage is
reported as 100% instead of 9x%.

You can do this already with current Coverage: tell Coverage to exclude
<URL:http://nedbatchelder.com/code/coverage/excluding.html> specific
statements, and it won't count them for coverage calculations.


An alternative to Ned's great bit of kit is figleaf. This, Ned's and many other useful tools are listed here https://wiki.python.org/moin/PythonTestingToolsTaxonomy

--
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to