diff options
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/coverage/control.py b/coverage/control.py index fa6fec7..d5e2c6f 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -43,7 +43,7 @@ class coverage(object): def __init__(self, data_file=None, data_suffix=None, cover_pylib=None, auto_data=False, timid=None, branch=None, config_file=True, source=None, omit=None, include=None, debug=None, - debug_file=None): + debug_file=None, coroutine=None): """ `data_file` is the base name of the data file to use, defaulting to ".coverage". `data_suffix` is appended (with a dot) to `data_file` to @@ -82,6 +82,11 @@ class coverage(object): desired. `debug_file` is the file to write debug messages to, defaulting to stderr. + `coroutine` is a string indicating the coroutining library being used + in the measured code. Without this, coverage.py will get incorrect + results. Valid strings are "greenlet", "eventlet", or "gevent", which + are all equivalent. + """ from coverage import __version__ @@ -114,6 +119,7 @@ class coverage(object): data_file=data_file, cover_pylib=cover_pylib, timid=timid, branch=branch, parallel=bool_or_none(data_suffix), source=source, omit=omit, include=include, debug=debug, + coroutine=coroutine, ) # Create and configure the debugging controller. @@ -142,7 +148,8 @@ class coverage(object): self.collector = Collector( self._should_trace, timid=self.config.timid, - branch=self.config.branch, warn=self._warn + branch=self.config.branch, warn=self._warn, + coroutine=self.config.coroutine, ) # Suffixes are a bit tricky. We want to use the data suffix only when |