code coverage tool with emacs integration?

Discussion in 'Python' started by John J. Lee, Jul 27, 2003.

  1. John J. Lee

    John J. Lee Guest

    Anybody know of one?

    Actually, I have a feeling that emacs understands a standard format
    for errors, which would make it really easy to implement this by
    having the coverage tool print results in that format -- anybody know
    where to find the details?


    I also wonder if some kind of graphical display might be useful
    somehow, having been inspired by this:

    http://kcachegrind.sourceforge.net/

    (really, I just like the pretty pictures :)


    John
    John J. Lee, Jul 27, 2003
    #1
    1. Advertising

  2. John> Anybody know of one?

    John> Actually, I have a feeling that emacs understands a standard
    John> format for errors, which would make it really easy to implement
    John> this by having the coverage tool print results in that format --
    John> anybody know where to find the details?

    compilation-error-regexp-alist. The simplest format to remember is

    filename:linenumber:message

    I'm not sure what you're after though. Code coverage tools generally emit
    annotated listings, not compiler-like output. What would you like it to do,
    emit file:line:msg info for the start of each run of lines which weren't
    covered? How would you get any context showing you what lines in the region
    had been executed at least once?

    Skip
    Skip Montanaro, Jul 27, 2003
    #2
    1. Advertising

  3. John J. Lee

    John J. Lee Guest

    Skip Montanaro <> writes:
    [...]
    > compilation-error-regexp-alist. The simplest format to remember is


    Thanks.

    [...]
    > emit file:line:msg info for the start of each run of lines which weren't
    > covered?


    Yes.


    > How would you get any context showing you what lines in the region
    > had been executed at least once?


    Why would I want to?

    I haven't done any proper code-coverage analysis before, but I
    had imagined just doing:

    while 1:
    uncovered = run_coverage_tool(my_code)
    if not uncovered: break
    jump_to(uncovered[0])
    think()
    write_test()


    John
    John J. Lee, Jul 28, 2003
    #3

  4. >> How would you get any context showing you what lines in the region
    >> had been executed at least once?


    John> Why would I want to?

    For me, analyzing code coverage consists of studying the code in the region
    around the uncovered line(s). Knowing which lines in the area have and
    haven't been covered helps me analyze what's missing in my test coverage.

    Skip
    Skip Montanaro, Jul 28, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. milesd
    Replies:
    4
    Views:
    1,663
    Dale King
    Aug 29, 2003
  2. bill turner
    Replies:
    2
    Views:
    1,124
    bill turner
    Jul 19, 2005
  3. Raj
    Replies:
    4
    Views:
    7,786
    asicvlsi
    Feb 21, 2008
  4. Ben Finney
    Replies:
    7
    Views:
    538
    Ned Batchelder
    Oct 30, 2007
  5. Replies:
    0
    Views:
    383
Loading...

Share This Page