-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Replace unittests test cases by pure pytest [Wave-1]
#26831
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
Replace unittests test cases by pure pytest [Wave-1]
#26831
Conversation
tests/core/test_stats.py
Outdated
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.
Just add todo to figure out later why implementation same as test_does_send_stats_using_dogstatsd_when_dogstatsd_on
3c1a0dd to
614d3dd
Compare
tests/www/test_utils.py
Outdated
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.
Also "fix" this test seems like it just copy of test_python_callable_none but name of the test more related to doc_md attribute
614d3dd to
d9988a1
Compare
d9988a1 to
4c1f0d1
Compare
uranusjr
left a comment
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.
I didn’t read everything, but this seems straightforward enough from the 10-ish files I sampled. This should be good as long as CI passes.
potiuk
left a comment
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.
COOL!
(cherry picked from commit 1c7c976)
(cherry picked from commit 1c7c976)
A lot of tests still uses
unittest.TestCaseclass as base method for test classes as well as internals of this class. May be it a good time to start convert tests to use nativepytestfunctionality.Total number of modules which uses
unittest.TestCaseTotal number of modules which uses
unittest.TestCaseTotal number of providers tests submodules which uses
unittest.TestCase(by submodules)Note: "apache", "microsoft", "common" has own sub-packages which contains separate providers
This PR focus on only simple changes in tests exclude
providersandcharts:unittest.TestCasesetUpmethod ->setup_methodtearDownmethod ->teardown_methodsetUpClassclassmethod ->setup_classtearDownClass->teardown_classparameterized.expanddecorator ->pytest.mark.parametrizeself.assertRaisescontext manager ->pytest.raisesResult after changes