-
Notifications
You must be signed in to change notification settings - Fork 132
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
base: master
Are you sure you want to change the base?
Conversation
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.
@cebtenzzre would it please be possible to look into this? |
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. |
@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? |
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. |
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. |
@sbraz Thanks a lot for this PR, I know it probably took quite some time to get all sorted out. It's sad to see the package was dropped from gentoo, and the AUR package in arch is going the same direction so I'm trying to avoid it. With some luck maybe the package in gentoo can be eventually restored :) I know it might be a lot to ask, but if you happen to have the time, would you mind rebasing this PR against master? I'm just realizing that in that MR I likely broke support for Anyways, thanks again for the work here! :) |
@fermino I'll try at some point, maybe it's not that much work. And I know Gentoo users miss the package. |
@sbraz Sure, no worries about it! If I happen to have some time to give it a look I will post any updates here. As per this comment it should be As a side note, you might find #677 interesting, I haven't added support for gentoo as I'm not familiar with the building process, but if we can get nose sorted out I will add it so we can keep track of its state. |
Same situation on Debian & derivatives for what it's worth. Only a handful of mostly unreleasable thing depending on Nose still. From users telemetry This GBP has a special status of "key package" (well it really ties the whole distro together). And Nose inherit transitively this property. So any day GBP author decides to upload his package will start an autoremoval counter for I don't know precisely how Ubuntu manage their fork. |
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:
shell
andinverse_order
.