diff options
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( |