1. Ned Batchelder
  2. coverage.py
  3. Issues
Issue #543 duplicate

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

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 run_examples.py --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>
    sys.exit(run_exit())
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/core.py", line 121, in __init__
    **extra_args)
  File "/opt/python/2.7.12/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/core.py", line 145, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/config.py", line 346, in configure
    self.plugins.configure(options, self)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/manager.py", line 284, in configure
    cfg(options, config)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/nose/plugins/cover.py", line 142, in configure
    source=self.coverPackages)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/coverage/control.py", line 140, in __init__
    concurrency=concurrency,
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/coverage/config.py", line 446, in read_coverage_config
    config.sanity_check()
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/coverage/config.py", 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. Log in to comment