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

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

    [run]
    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