Re: [python-committers] Codecov and PR

2017-04-26 Thread Ethan Furman
On 04/25/2017 10:15 PM, INADA Naoki wrote: This is one examples I merged "untested line of code". https://github.com/python/cpython/pull/162/files#diff-0ad86c44e7866421ecaa5ad2c0edb0e2R552 +file_object = builtins.open(f, 'wb') +try: +self.initfp(file_obje

Re: [python-committers] Codecov and PR

2017-04-26 Thread Ethan Furman
On 04/25/2017 11:05 PM, Victor Stinner wrote: On 04/25/2017 10:15 PM, INADA Naoki wrote: `self.initfp()` is very unlikely raise exceptions. But MemoryError, KeyboardInterrupt or other rare exceptions may be happen. unittest.mock helps a lot to test such corner case: mock initfp(

Re: [python-committers] Codecov and PR

2017-04-26 Thread Brett Cannon
On Tue, 25 Apr 2017 at 17:00 Terry Reedy wrote: > On 4/25/2017 11:00 AM, Barry Warsaw wrote: > > On Apr 24, 2017, at 09:32 PM, Ethan Furman wrote: > >>On 04/21/2017 03:29 PM, Victor Stinner wrote: > > (In the context of having a patch blocked by the blind Codecov robot ...) > > >>> I dislike code

Re: [python-committers] Codecov and PR

2017-04-26 Thread Terry Reedy
On 4/26/2017 1:45 PM, Brett Cannon wrote: On Tue, 25 Apr 2017 at 17:00 Terry Reedy > wrote: While I use code coverage to improve automated unittesting, I am opposed to turning a usable but limited and sometime faulty tool into a blind robotic master that b

Re: [python-committers] Codecov and PR

2017-04-26 Thread Ethan Furman
On 04/26/2017 10:35 PM, Terry Reedy wrote: On 4/26/2017 1:45 PM, Brett Cannon wrote: :) But they are at least executed which is what we're really measuring here and I think all Ethan and I are advocating for. I thought Ethan was advocating for more -- a specific unittest for each line. I'

Re: [python-committers] Codecov and PR

2017-04-26 Thread Terry Reedy
On 4/27/2017 1:52 AM, Ethan Furman wrote: On 04/26/2017 10:35 PM, Terry Reedy wrote: On 4/26/2017 1:45 PM, Brett Cannon wrote: :) But they are at least executed which is what we're really measuring here and I think all Ethan and I are advocating for. I thought Ethan was advocating for more