diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-02-22 07:22:52 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-02-22 07:22:52 -0500 |
commit | 95b613a9202ec075e68ee0600a880dd8cba26d6c (patch) | |
tree | fee3f38e23f8fac2a9b0b041ed714f6a517a0bc9 | |
parent | 1e1c98cd4f3d7ee55f855badaa5fbceae7a6d424 (diff) | |
download | python-coveragepy-git-95b613a9202ec075e68ee0600a880dd8cba26d6c.tar.gz |
Fiddling with docs for 3.3
-rw-r--r-- | CHANGES.txt | 12 | ||||
-rw-r--r-- | TODO.txt | 6 | ||||
-rw-r--r-- | coverage/control.py | 19 | ||||
-rw-r--r-- | doc/api.rst | 15 | ||||
-rw-r--r-- | doc/changes.rst | 30 |
5 files changed, 67 insertions, 15 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index fc6c7cd3..23f9b355 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,9 +6,11 @@ Change history for Coverage.py Version 3.3 ----------- -- Settings are now read from a .coveragerc file. The name of the file can be - set with the `config_file` argument to the coverage() constructor, or reading - a config file can be disabled with `config_file=False`. +- Settings are now read from a .coveragerc file. A specific file can be + specified on the command line with --rcfile=FILE. The name of the file can + be programmatically set with the `config_file` argument to the coverage() + constructor, or reading a config file can be disabled with + `config_file=False`. - Fixed a problem with nested loops having their branch possibilities mischaracterized: `issue 39`_. @@ -23,8 +25,8 @@ Version 3.3 they're combined, to clean up unneeded files. Fixes `issue 40`_. - Exceptions thrown from product code run with "coverage run" are now displayed - without internal coverage.py frames, so the output is the same as if the code - is run without coverage.py. + without internal coverage.py frames, so the output is the same as when the + code is run without coverage.py. - The `data_suffix` argument to the coverage constructor is now appended with an added dot rather than simply appended, so that .coveragerc files will not @@ -5,6 +5,9 @@ Coverage TODO - Config file + A command switch to point to the rc file. - Write docs + +* Soon + - Ship the nose and py.test plugin. - Better omit handling that ignores files during measurement. - Deal with ~ in specified paths correctly. @@ -98,6 +101,9 @@ x Why can't you specify execute (-x) and report (-r) in the same invocation? from the command line, to reconsider exclusions. - Reporting on files never touched by coverage (package completeness) - A setup.py command? http://jeetworks.org/node/50 +- Deltas: indicate the change in coverage percentage from the last run. +- Show lines missing rather than lines run in the reporting, since that's what + you need to focus on. * Beauty diff --git a/coverage/control.py b/coverage/control.py index f7057323..a42d0835 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -393,7 +393,7 @@ class coverage(object): file_to_close.close() def sysinfo(self): - """Return a list of key,value pairs showing internal information.""" + """Return a list of (key, value) pairs showing internal information.""" import coverage as covmod import platform, re @@ -420,15 +420,22 @@ class coverage(object): def process_startup(): """Call this at Python startup to perhaps measure coverage. - To invoke this when Python starts, you can create a .pth file in your - Python installation containing this:: - - import coverage; coverage.process_startup() - If the environment variable COVERAGE_PROCESS_START is defined, coverage measurement is started. The value of the variable is the config file to use. + There are two ways to configure your Python installation to invoke this + function when Python starts: + + #. Create or append to sitecustomize.py to add these lines:: + + import coverage + coverage.process_startup() + + #. Create a .pth file in your Python installation containing:: + + import coverage; coverage.process_startup() + """ cps = os.environ.get("COVERAGE_PROCESS_START") if cps: diff --git a/doc/api.rst b/doc/api.rst index 98187a8f..03cc7607 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -6,11 +6,12 @@ Coverage API :history: 20090524T134300, brand new docs. :history: 20090613T164000, final touches for 3.0 +:history: 20100221T151500, docs for 3.3 (on the plane back from PyCon) The API to coverage.py is very simple, contained in a single module called -coverage containing a single class, also called coverage. Methods on the -coverage object correspond to operations available in the command line -interface. For example, a simple use would be:: +`coverage`. Most of the interface is in a single class, also called +`coverage`. Methods on the coverage object correspond to operations available +in the command line interface. For example, a simple use would be:: import coverage @@ -30,3 +31,11 @@ The coverage module .. autoclass:: coverage :members: + + +Starting coverage automatically +------------------------------- + +This is cool. + +.. autofunction:: process_startup diff --git a/doc/changes.rst b/doc/changes.rst index aef10040..a0a5d278 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -10,7 +10,7 @@ Major change history for coverage.py :history: 20091004T170700, changes for 3.1
:history: 20091128T072200, changes for 3.2
:history: 20091205T161525, 3.2 final
-
+:history: 20100221T151900, changes for 3.3
These are the major changes for coverage.py. For a more complete change
history, see the `CHANGES.txt`_ file in the source tree.
@@ -18,6 +18,34 @@ history, see the `CHANGES.txt`_ file in the source tree. .. _CHANGES.txt: http://bitbucket.org/ned/coveragepy/src/tip/CHANGES.txt
+Version 3.3
+-----------
+
+- Settings are now read from a .coveragerc file. A specific file can be
+ specified on the command line with --rcfile=FILE. The name of the file can
+ be programmatically set with the `config_file` argument to the coverage()
+ constructor, or reading a config file can be disabled with
+ `config_file=False`.
+
+- Added coverage.process_start to enable coverage measurement when Python
+ starts.
+
+- Parallel data file names now have a random number appended to them in
+ addition to the machine name and process id. Also, parallel data files
+ combined with "coverage combine" are deleted after they're combined, to clean
+ up unneeded files. Fixes `issue 40`_.
+
+- Fixed a problem with nested loops having their branch possibilities
+ mischaracterized: `issue 39`_.
+
+- Exceptions thrown from product code run with "coverage run" are now displayed
+ without internal coverage.py frames, so the output is the same as when the
+ code is run without coverage.py.
+
+.. _issue 39: http://bitbucket.org/ned/coveragepy/issue/39
+.. _issue 40: http://bitbucket.org/ned/coveragepy/issue/40
+
+
Version 3.2, 5 December 2009
----------------------------
|