#121 Declined
Repository
coverage.py
Branch
issue-170-3
Repository
coveragepy
Branch
default
Author
  1. Loic Dachary
Reviewers
Description

This version of the wtw hack only works with --timid && --branch. The .coverage format is modified so arc pairs may be followed by a list of context. Internally the arcs are stored as { (a,b): set(context,...) } instead of { (a,b): None }. The summary report is modified to show the test closest to each missing line like so:

Name    Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------
a.py        7      1      2      1    78%   5, 4->5
  4 /home/loic/software/coveragepy/issue-170/reproducer/a.py:tests
  5 /home/loic/software/coveragepy/issue-170/reproducer/a.py:tests
c.py        2      0      0      0   100%
---------------------------------------------------
TOTAL       9      1      2      1    82%

It passes tox -e py27

Comments (6)

  1. Loic Dachary author

    @ned this hack focuses on the slow code path invoked via --timid to avoid performance concern during the run. The list of contexts stored in .coverage is large but can be optimized by replacing strings with pointers or even bitmaps. Now that it passed tests, I'm happy with the direction it is taking. I'll wait for your review before working on it more.

  2. Ned Batchelder repo owner

    You'll need to be clearer about the intent of these pull requests. They can't be merged. Why have both 120 and 121 open?

  3. Loic Dachary author

    @ned I just closed 120 which I had to abandon because bitbucket could not deal with multiple heads. Or because I don't how to convince bitbucket to deal with that ;-)

  4. Ned Batchelder repo owner

    You aren't clarifying your intent. I'm not going to merge code that adds this feature to pytracer.py

  5. Loic Dachary author

    @ned I'm not sure I understand your question. My intent is to move forward with wtw. I'm not sure what's going on ?

  6. Loic Dachary author

    For the record (after IRC chat), the main problem with this pull request is that it degrades the pytracer performances. People who depend on pytracer because they cannot use ctracer and it is important to not impact them negatively. In addition the in memory representation of arcs { (a,b): None } must not be changed unless there is a way to count lines. Changing None into a set() won't leave room for that.