summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-12-28 07:54:46 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-12-28 07:54:46 -0500
commit9de3dd83b0d8a72cf48c62fc79a52716c5493bf0 (patch)
treec2cb95450f1c25f64c513c26a79e5237a47e3295
parent1eeb1037b2cb04e79be33452f8b31a9b5dca4406 (diff)
downloadpython-coveragepy-9de3dd83b0d8a72cf48c62fc79a52716c5493bf0.tar.gz
Revert the check for conflicting --source and --include. Closes #541, re-opens #265
-rw-r--r--CHANGES.rst6
-rw-r--r--coverage/config.py3
-rw-r--r--tests/test_cmdline.py3
3 files changed, 12 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index cb0807b..15ceb21 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -11,7 +11,13 @@ Unreleased
- Some environments couldn't install 4.3, as described in `issue 540`_. This is
now fixed.
+- The check for conflicting ``--source`` and ``--include`` was too simple in a
+ few different ways, breaking a few perfectly reasonable use cases, described
+ in `issue 541`_. The check has been reverted while we re-think the fix for
+ `issue 265`_.
+
.. _issue 540: https://bitbucket.org/ned/coveragepy/issues/540/cant-install-coverage-v43-into-under
+.. _issue 541: https://bitbucket.org/ned/coveragepy/issues/541/coverage-43-breaks-nosetest-with-coverage
diff --git a/coverage/config.py b/coverage/config.py
index 287844b..bec7e7a 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -384,6 +384,9 @@ class CoverageConfig(object):
def sanity_check(self):
"""Check interactions among settings, and raise if there's a problem."""
+ return
+ # TODO: This check was too simple, and broke a few things:
+ # https://bitbucket.org/ned/coveragepy/issues/541/coverage-43-breaks-nosetest-with-coverage
if (self.source is not None) and (self.include is not None):
raise CoverageException("--include and --source are mutually exclusive")
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 45898f1..cbb1d13 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -460,6 +460,9 @@ class CmdLineTest(BaseCmdLineTest):
""")
def test_bad_run_args_with_both_source_and_include(self):
+ return
+ # TODO: This check was too simple, and broke a few things:
+ # https://bitbucket.org/ned/coveragepy/issues/541/coverage-43-breaks-nosetest-with-coverage
with self.assertRaisesRegex(CoverageException, 'mutually exclusive'):
self.command_line("run --include=pre1,pre2 --source=lol,wut foo.py", ret=ERR)