Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage 4.3 breaks "nosetest --with-coverage" #541

Closed
nedbat opened this issue Dec 27, 2016 · 12 comments
Closed

Coverage 4.3 breaks "nosetest --with-coverage" #541

nedbat opened this issue Dec 27, 2016 · 12 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Dec 27, 2016

Originally reported by Diego Rodriguez-Losada (Bitbucket: drsada, GitHub: Unknown)


Just after upgrade, I get this

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

#!python

  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


@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Do you have a .coveragerc file? Can you share your repo with me?

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Original comment by Diego Rodriguez-Losada (Bitbucket: drsada, GitHub: Unknown)


Yes, the repo is: https://github.com/conan-io/conan

And the builds that failed: https://travis-ci.org/conan-io/conan/builds/187080247 (fails the same in Windows with appveyor)

I fixed my build forcing coverage==4.2.

Thanks!

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Original comment by Łukasz Bołdys (Bitbucket: utek, GitHub: utek)


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

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

@utek With coverage==4.2, do you find that the report --include setting is used?

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

We're reverting that check to fix these problems.

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Original comment by Loic Dachary (Bitbucket: dachary, GitHub: dachary)


For the record, the regression was introduced by https://bitbucket.org/ned/coveragepy/commits/4aced78ac2a1 incorrectly trying to implement https://bitbucket.org/ned/coveragepy/issues/265/when-using-source-include-is-silently

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Original comment by Łukasz Bołdys (Bitbucket: utek, GitHub: utek)


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

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Revert the check for conflicting --source and --include. Closes #541, re-opens #265

→ <<cset d427811cbc79 (bb)>>

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Original comment by Diego Rodriguez-Losada (Bitbucket: drsada, GitHub: Unknown)


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.

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

This fix has been released as part of version 4.3.1: https://pypi.python.org/pypi/coverage/4.3.1

@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Original comment by Diego Rodriguez-Losada (Bitbucket: drsada, GitHub: Unknown)


4.3.1 works fine again, thanks :)

@nedbat nedbat closed this as completed Dec 28, 2016
@nedbat
Copy link
Owner Author

nedbat commented Dec 28, 2016

Issue #543 was marked as a duplicate of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant