-
Notifications
You must be signed in to change notification settings - Fork 427
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
[testing] Remove nose usage #870
Conversation
5f7ef99
to
bcffd0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one big suggestion I would have here is that we follow use the unittest.TestCase.assert*
methods for any test cases we have already moved to using BaseTracerTestCase
. That might be a separate PR from this one that removes the dependency to nose
though.
What do you think?
PS RIP nose
I'd rather suggest to go full pytest and drop (in the long run) There's no upside of using
And some other things listed here. |
This has been deprecated and unmaintained for years; stop installing it. - Replaces `nose.tools.ok_` with `assert` - Replaces `nose.tools.eq_` with `assert ==` - Replaces `nose.tools.assert_raises` with `pytest.raises` - Add missing unittest.TestCase inheritance in some place - Only install requests-mock for requests_contrib scenarios; this modules has a pytest plugin that gets loaded otherwise and pre-load - `requests`, making some test checking for module load ordering fail.
I'd actually prefer to use base Happy to discuss further if everyone feels that is a silly stance. |
I guess there are two different things here, the runner and the test framework. The thing is that — at least in the case of pytest — they are a bit tangled, making it weird to use unittest+pytest, which is actually more considered as a "compatibility mode" from pytest PoV. That's the main reason that would make me lean towards going full pytest rather than staying in a "compat" world. Considering pytest usage nowadays, I don't think the trade-off of staying in "unittest+pytest-compat-mode-in-case-the-world-switch-away-from-pytest" rather than the perks of going full pytest is worth it. :) |
@jd fair enough. I've always had issues using some I don't have that strong of an opinion here, was just going simple (hell, should we just go with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really hoping you mostly just used sed
here and didn't manually update all of these? 0_o
But otherwise, this lgtm.
I don't know about that jk, yeah I used |
This has been deprecated and unmaintained for years; stop installing it.
nose.tools.ok_
withassert
nose.tools.eq_
withassert ==
nose.tools.assert_raises
withpytest.raises
requests
, making some test checking for module load ordering fail.