diff options
-rw-r--r-- | coverage/control.py | 9 | ||||
-rw-r--r-- | tests/test_config.py | 9 |
2 files changed, 5 insertions, 13 deletions
diff --git a/coverage/control.py b/coverage/control.py index e658ef1..e0aa998 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -148,16 +148,11 @@ class Coverage(object): for fname, prefix in [(config_file, ""), ("setup.cfg", "coverage:"), ("tox.ini", "coverage:")]: - config_read = self.config.from_file(fname, - section_prefix=prefix) - print('config read?') - print(config_read) + config_read = self.config.from_file(fname, section_prefix=prefix) is_config_file = fname == config_file if not config_read and is_config_file and specified_file: - raise CoverageException( - "Couldn't read '%s' as a config file" % fname - ) + raise CoverageException("Couldn't read '%s' as a config file" % fname) if config_read: break diff --git a/tests/test_config.py b/tests/test_config.py index b45b89b..86abe57 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -377,8 +377,7 @@ class ConfigFileTest(CoverageTest): def test_config_file_settings_in_toxini(self): self._test_config_file_settings_in_x("tox.ini", self.TOX_INI) - def _test_config_file_settings_in_x_if_coveragerc_specified(self, fname, - contents): + def _test_config_file_settings_in_x_if_coveragerc_specified(self, fname, contents): # Configuration will be read from a non-".coveragerc" file from # sections prefixed with "coverage:", even if the API said to read from # a (non-existent) .coveragerc file. @@ -388,12 +387,10 @@ class ConfigFileTest(CoverageTest): self.assert_config_settings_are_correct(cov) def test_config_file_settings_in_setupcfg_if_coveragerc_specified(self): - self._test_config_file_settings_in_x_if_coveragerc_specified( - "setup.cfg", self.SETUP_CFG) + self._test_config_file_settings_in_x_if_coveragerc_specified("setup.cfg", self.SETUP_CFG) def test_config_file_settings_in_tox_if_coveragerc_specified(self): - self._test_config_file_settings_in_x_if_coveragerc_specified( - "tox.ini", self.TOX_INI) + self._test_config_file_settings_in_x_if_coveragerc_specified("tox.ini", self.TOX_INI) def _test_x_only_if_not_coveragerc(self, fname): self.make_file(".coveragerc", """\ |