From 9de3dd83b0d8a72cf48c62fc79a52716c5493bf0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 28 Dec 2016 07:54:46 -0500 Subject: Revert the check for conflicting --source and --include. Closes #541, re-opens #265 --- CHANGES.rst | 6 ++++++ coverage/config.py | 3 +++ tests/test_cmdline.py | 3 +++ 3 files changed, 12 insertions(+) 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) -- cgit v1.2.1