diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-27 09:49:23 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-04-27 09:49:23 -0400 |
commit | b1b8707c81edf0012e07089bc876b534d01e3ee7 (patch) | |
tree | c0f0f433ffcba669175d536182fb68ac97c8e380 /coverage/control.py | |
parent | 6c4465b4b6b56dcae5c658b1dee9376441876d5a (diff) | |
parent | c13d9b0f1c7c101129def4a7588a519a8a12e022 (diff) | |
download | python-coveragepy-b1b8707c81edf0012e07089bc876b534d01e3ee7.tar.gz |
Merge bug_123 work into default.
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/coverage/control.py b/coverage/control.py index dd65661..cee073e 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -64,7 +64,8 @@ class coverage(object): measured. `include` and `omit` are lists of filename patterns. Files that match - `include` will be measured, files that match `omit` will not. + `include` will be measured, files that match `omit` will not. Each + will also accept a single string argument. """ from coverage import __version__ @@ -95,6 +96,10 @@ class coverage(object): self.config.data_file = env_data_file # 4: from constructor arguments: + if isinstance(omit, string_class): + omit = [omit] + if isinstance(include, string_class): + include = [include] self.config.from_args( data_file=data_file, cover_pylib=cover_pylib, timid=timid, branch=branch, parallel=bool_or_none(data_suffix), |