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

Make coverage plugin compatible with Coverage.py 4.1 #1004

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mitya57
Copy link
Contributor

@mitya57 mitya57 commented Jun 29, 2016

According to the Coverage.py 4.1 changelog:

  • The Coverage.report function had two parameters with non-None defaults,
    which have been changed. show_missing used to default to True, but now
    defaults to None. If you had been calling Coverage.report without
    specifying show_missing, you'll need to explicitly set it to True to keep
    the same behavior.

Without that option, four tests in nose fail:

  • test_coverage_plugin.TestCoverageMinPercentagePlugin
  • test_coverage_plugin.TestCoverageMinPercentageSinglePackagePlugin
  • test_coverage_plugin.TestCoverageMinPercentageSinglePackageWithBranchesPlugin
  • test_coverage_plugin.TestCoveragePlugin

The example of the failure can be seen in https://bugs.debian.org/828224.

According to the Coverage.py 4.1 changelog:

- The `Coverage.report` function had two parameters with non-None defaults,
  which have been changed.  `show_missing` used to default to True, but now
  defaults to None.  If you had been calling `Coverage.report` without
  specifying `show_missing`, you'll need to explicitly set it to True to keep
  the same behavior.

Without that option, four tests in nose fail:

- test_coverage_plugin.TestCoverageMinPercentagePlugin
- test_coverage_plugin.TestCoverageMinPercentageSinglePackagePlugin
- test_coverage_plugin.TestCoverageMinPercentageSinglePackageWithBranchesPlugin
- test_coverage_plugin.TestCoveragePlugin
@opoplawski
Copy link

Needed to apply this to the Fedora python-nose package to get it to pass tests with converage 4.2, so +1 here.

@jszakmeister
Copy link
Contributor

Nose is unmaintained. Unless someone else takes over maintainership, it's not going to happen. Sorry.

@johnyf
Copy link

johnyf commented Nov 12, 2016

Is nose2 planned to replace nose? In other words, is it worth for a new maintainer to adopt nose, or should we instead turn our attention to nose2?

In case of the latter, then a note could be added to the README of nose, in order to point people to nose2.

@jszakmeister
Copy link
Contributor

There is a note on the main page of the docs: http://nose.readthedocs.io/en/latest/

Yes, I think you should be looking at Nose 2. It's not compatible with Nose 1.x though. Make sure to read the caveats.

Also, the README is auto-generated. If you put together a proper patch to document that fact, then I'll merge it.

@johnyf
Copy link

johnyf commented Nov 13, 2016

Thanks for the information. I'll try to create a patch for the code that generates the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants