diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-12 06:36:57 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-12 06:36:57 -0400 |
commit | c210ecb765bc60b2424df284d0c101dc0bfeaf4d (patch) | |
tree | 9978747b379bfa57a803e1f01bd323206b79ef27 /coverage/control.py | |
parent | 8ad4d1e4d1734a1c1a1a4c960a67ffab1d39528a (diff) | |
download | python-coveragepy-git-c210ecb765bc60b2424df284d0c101dc0bfeaf4d.tar.gz |
Dynamic contexts can be disabled with 'none'
Diffstat (limited to 'coverage/control.py')
-rw-r--r-- | coverage/control.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/coverage/control.py b/coverage/control.py index 552f7bc2..4cd1adad 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -349,13 +349,14 @@ class Coverage(object): # it for the main process. self.config.parallel = True - if self.config.dynamic_context is None: + dycon = self.config.dynamic_context + if not dycon or dycon == "none": context_switchers = [] - elif self.config.dynamic_context == "test_function": + elif dycon == "test_function": context_switchers = [should_start_context_test_function] else: raise CoverageException( - "Don't understand dynamic_context setting: {!r}".format(self.config.dynamic_context) + "Don't understand dynamic_context setting: {!r}".format(dycon) ) context_switchers.extend( |