Coverage 4.3 breaks "nosetest --with-coverage"

Issue #541 closed
Diego Rodriguez-Losada created an issue

Just after upgrade, I get this

nosetests . --with-coverage Traceback (most recent call last):

  File "c:\python27\Lib\", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\Lib\", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\drodri\Envs\conan\Scripts\nosetests.exe\", line 9, in <module>
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\", line 121, in __init__
  File "c:\python27\Lib\unittest\", line 94, in __init__
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\", line 145, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\", line 346, in configure
    self.plugins.configure(options, self)
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\plugins\", line 284, in configure
    cfg(options, config)
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\plugins\", line 99, in __call__
    return*arg, **kw)
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\plugins\", line 167, in simple
    result = meth(*arg, **kw)
  File "c:\users\drodri\envs\conan\lib\site-packages\nose\plugins\", line 142, in configure
  File "c:\users\drodri\envs\conan\lib\site-packages\coverage\", line 140, in __init__
  File "c:\users\drodri\envs\conan\lib\site-packages\coverage\", line 446, in read_coverage_config
  File "c:\users\drodri\envs\conan\lib\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

Downgrading to 4.2, everything fine again. Any suggestion? Thanks very much for your help

Comments (12)

  1. Łukasz Bołdys

    Hi. I have similar problem with coverage==4.3 --include and --source are mutually exclusive

    It happens only when using coverage report --include=<path> when there is

    source = unhaggle

    in .coveragerc

  2. Łukasz Bołdys

    @ned Yes. With coverage==4.2 everything is working as it should. (We pinned coverage for now to fix that issue)

  3. Diego Rodriguez-Losada reporter

    Great, thanks! Will a patch coverage 4.3.1 be released with the fix? I will keep pinned 4.2 until then, please tell so I could upgrade. Thanks again for the quick fix.

  4. Log in to comment