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

Tests: replace nose with pytest #603

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

Conversation

sbraz
Copy link
Contributor

@sbraz sbraz commented Jan 3, 2023

Hi,
nose is no longer maintained, see
nose-devs/nose#1099 (comment).

This bug was initially submitted here: https://bugs.gentoo.org/878695.

This commit switches to pytest.

Amongst the changes, here are the most relevant ones:

  • Create a conftest.py that contains fixtures.
  • Replace nose.with_setup with yield fixtures.
  • Use pytest.skip instead of print and nose.plugins.skip.SkipTest.
  • Use pytest.mark.slow instead of nose.plugins.attrib.attr("slow").
  • Use pytest.mark.parametrize instead of parameterized, simplify parametrized tests that use both shell and inverse_order.
  • Update Travis config.
  • Update SConscript.
  • Update documentation.

nose is no longer maintained, see
nose-devs/nose#1099 (comment).

This was initially submitted here: https://bugs.gentoo.org/878695.

This commit switches to pytest.

Amongst the changes, here are the most relevant ones:
* Create a conftest.py that contains fixtures.
* Replace nose.with_setup with yield fixtures.
* Use pytest.skip instead of print and nose.plugins.skip.SkipTest.
* Use pytest.mark.slow instead of nose.plugins.attrib.attr("slow").
* Use pytest.mark.parametrize instead of parameterized, simplify
  parametrized tests that use both `shell` and `inverse_order`.
* Update Travis config.
* Update SConscript.
* Update documentation.
@sbraz
Copy link
Contributor Author

sbraz commented Feb 11, 2023

@cebtenzzre would it please be possible to look into this?

@cebtenzzre
Copy link
Collaborator

I know that nose is unmaintained, but it works fine on the distro I use (Arch Linux). I would like to replace it with something like nose2 or pytest in the future, and I will consider your changes. But it is not a priority at the moment, and I've made a lot of changes to the tests locally that would conflict with this PR.

@sbraz
Copy link
Contributor Author

sbraz commented Jul 26, 2023

@cebtenzzre any chance you could look into this at one point? If I were to rebase this on master or develop (not sure I will because I already spent hours on this PR), would you merge it?

@cebtenzzre
Copy link
Collaborator

I haven't been spending much time on rmlint lately, but I would still want to push more of my own changes which include additional tests before I merge this PR.

@sbraz
Copy link
Contributor Author

sbraz commented Feb 28, 2024

Hi @cebtenzzre, FYI Gentoo is about to drop the package because it's one of the few that haven't migrated away from nose, see https://bugs.gentoo.org/878695#c5.

It saddens me as I put a lot of hours into packaging it, making the test suite work, and creating this PR. I really liked using rmlint too. I still think pytest is the way to go and nose2 is not the best solution. If you think you can fix this in the coming weeks, that would be really nice and maybe I can add it back at some point.

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.

None yet

2 participants