diff options
-rw-r--r-- | coverage/__init__.py | 2 | ||||
-rw-r--r-- | doc/cmd.rst | 11 | ||||
-rw-r--r-- | doc/config.rst | 10 | ||||
-rw-r--r-- | doc/index.rst | 9 | ||||
-rw-r--r-- | doc/python-coverage.1.txt | 4 |
5 files changed, 31 insertions, 5 deletions
diff --git a/coverage/__init__.py b/coverage/__init__.py index 31be23a6..67dd6e88 100644 --- a/coverage/__init__.py +++ b/coverage/__init__.py @@ -96,7 +96,7 @@ except KeyError: # COPYRIGHT AND LICENSE # # Copyright 2001 Gareth Rees. All rights reserved. -# Copyright 2004-2013 Ned Batchelder. All rights reserved. +# Copyright 2004-2014 Ned Batchelder. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are diff --git a/doc/cmd.rst b/doc/cmd.rst index 49062b31..cb401597 100644 --- a/doc/cmd.rst +++ b/doc/cmd.rst @@ -17,6 +17,7 @@ Coverage command line usage :history: 20120807T211600, Clarified the combine rules. :history: 20121003T074600, Fixed an option reference, https://bitbucket.org/ned/coveragepy/issue/200/documentation-mentions-output-xml-instead :history: 20121117T091000, Added command aliases. +:history: 20140924T193000, Added --concurrency .. highlight:: console @@ -95,6 +96,16 @@ but before the program invocation:: $ coverage run --source=dir1,dir2 my_program.py arg1 arg2 $ coverage run --source=dir1,dir2 -m packagename.modulename arg1 arg2 +Coverage can measure multi-threaded programs by default. If you are using +more exotic concurrency, with the `greenlet`_, `eventlet`_, or `gevent`_ +libraries, then coverage will get very confused. Use the ``--concurrency`` +switch to properly measure programs using these libraries. Give it a value of +``greenlet``, ``eventlet``, or ``gevent``. + +.. _greenlet: http://greenlet.readthedocs.org/en/latest/ +.. _gevent: http://www.gevent.org/ +.. _eventlet: http://eventlet.net/ + By default, coverage does not measure code installed with the Python interpreter, for example, the standard library. If you want to measure that code as well as your own, add the ``-L`` flag. diff --git a/doc/config.rst b/doc/config.rst index 882fc777..792ed45a 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -10,6 +10,7 @@ Configuration files :history: 20110604T184400, updated for 3.5. :history: 20110827T212700, updated for 3.5.1 :history: 20130926T222300, updated for 3.6.1 +:history: 20140925T064700, updated for 4.0a1 Coverage.py options can be specified in a configuration file. This makes it @@ -90,6 +91,15 @@ to more than one command. ``cover_pylib`` (boolean, default False): whether to measure the Python standard library. +``concurrency`` (string, default "thread"): the name of the concurrency +library in use by the product code. If your program uses `gevent`_, +`greenlet`_, or `eventlet`_, you must name that library in this option, or +coverage will produce very wrong results. + +.. _greenlet: http://greenlet.readthedocs.org/en/latest/ +.. _gevent: http://www.gevent.org/ +.. _eventlet: http://eventlet.net/ + ``data_file`` (string, default ".coverage"): the name of the data file to use for storing or reporting coverage. diff --git a/doc/index.rst b/doc/index.rst index 3a0d9308..8a4cefa9 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -31,6 +31,7 @@ coverage.py :history: 20130105T174000, Updated for 3.6 :history: 20131005T210000, Updated for 3.7 :history: 20131212T213300, Updated for 3.7.1 +:history: 20140924T073000, Updated for 4.0a1 Coverage.py is a tool for measuring code coverage of Python programs. It @@ -44,14 +45,14 @@ not. .. ifconfig:: not prerelease The latest version is coverage.py 3.7.1, released 13 December 2013. - It is supported on Python versions 2.3 through 3.4, and PyPy 2.1. + It is supported on Python versions 2.6 through 3.4, and PyPy 2.2. .. ifconfig:: prerelease - The latest version is coverage.py 3.6b3, released 29 December 2012. - It is supported on Python versions 2.3 through 3.3, and PyPy 1.9. + The latest version is coverage.py 4.0a1, released 25 September 2014. + It is supported on Python versions 2.6 through 3.4, and PyPy 2.2. **This is a pre-release build. The usual warnings about possible bugs apply.** - The latest stable version is coverage.py 3.5.3, `described here`_. + The latest stable version is coverage.py 3.7.1, `described here`_. .. _described here: http://nedbatchelder.com/code/coverage diff --git a/doc/python-coverage.1.txt b/doc/python-coverage.1.txt index 9ea5f4ee..e5f65d63 100644 --- a/doc/python-coverage.1.txt +++ b/doc/python-coverage.1.txt @@ -160,6 +160,10 @@ COMMAND REFERENCE \--branch Measure branch coverage in addition to statement coverage. + \--concurrency `LIB` + Properly measure code using a concurrency library. Valid values are: + thread, gevent, greenlet, eventlet. + \--debug `DEBUGOPT`,... Debug options `DEBUGOPT`, separated by commas. |