Ethan Furman <et...@stoneleaf.us> writes: > On 10/24/2013 01:54 PM, Ben Finney wrote: > > 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. > > While that's neat (being able to exclude items) is there any reason to > ever count the `if __name__ == '__main__'` clause?
I'd rather Coverage not go down the track of accumulating special cases based on how they're written. A simple pragma fixes the problem, no matter what the exact statement looks like. -- \ “Prediction is very difficult, especially of the future.” | `\ —Niels Bohr | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list