add --white-board parameter for run

#59 Declined
Repository
coverage.py
Branch
whiteboard
Repository
coverage.py
Branch
default
Author
  1. Alexander Todorov
Reviewers
Description

This change adds the --white-board parameter which is taken into account when using coverage run. The intention is to save an arbitrary string into the coverage data file which may describe how the tests were run. The change also updates the test suite.

In my environment there are multiple test scenarios which produce different coverage data. It's a large application which is not tested using unittest style tests but using other automation techniques.

I'd like to have all of this data annotated so I can distinguish between the results. I'm also planning on processing this data on my own (with a custom tool) to produce aggregated coverage reports. That's why I haven't added functionality to the report or html commands. I can do this if others think it is necessary.

Comments (3)

  1. Ned Batchelder repo owner

    @Alexander Todorov This is an interesting idea. As it happens, I am massively reworking the data layer. I was wondering about storing metadata like this.

    I think it would be little-used though, so I would rather not add a command-line switch. How about a config option, and you can use an environment variable to set it?

    [run]
    data-note = $MY_DATA_NOTE
    

    then:

    MY_DATA_NOTE="tested on python 2.7" coverage run tests.py
    

    BTW, I was also thinking about automatically storing information like the version of Python, the machine name, the command line, etc.