coverage.misc.CoverageException: --include and --source are mutually exclusive

Issue #543 duplicate
Mike Jarvis created an issue

I'm getting an error running unit tests with nosetests that I suspect is due to something in the recent update to coverage 4.3: (cf. full travis log)

$ nosetests --with-coverage --cover-package=galsim --with-doctest
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.12/bin/nosetests", line 11, in <module>
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/", line 121, in __init__
  File "/opt/python/2.7.12/lib/python2.7/unittest/", line 94, in __init__
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/", line 145, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/", line 346, in configure
    self.plugins.configure(options, self)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/", line 284, in configure
    cfg(options, config)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/", line 99, in __call__
    return*arg, **kw)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/", line 167, in simple
    result = meth(*arg, **kw)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/", line 142, in configure
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/coverage/", line 140, in __init__
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/coverage/", line 446, in read_coverage_config
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/coverage/", line 388, in sanity_check
    raise CoverageException("--include and --source are mutually exclusive")
coverage.misc.CoverageException: --include and --source are mutually exclusive

This error just started showing up today, so I suspect it has to do with the upgrade to coverage 4.3. But let me know if this is actually an upstream problem where I've been doing something invalid and 4.3 is just the first version to notice.

Also attaching the .coveragerc file we use in case helpful.

Comments (3)

  1. Mike Jarvis reporter

    Ah. Sorry for the noise. The other issue didn't show up yet when I searched. Thanks for the quick response!

  2. Log in to comment