-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use pytest instead of nosetests #16883
Conversation
Nosetests has been in maintenance mode for years, its last release was released in 2015. When evolving the testing framework for Python tests it would be better to do it based on a maintained test tool.
Pinging @elastic/integrations-platforms (Team:Platforms) |
Closing this by now. |
We have talked internally about this and we think that it worths to continue migrating out of nosetests even if we don't have any other immediate benefit. So I will continue with this change. |
Can you create an issue focusing on the need to remove this because 3.9? Thanks! |
Sure, issue about supporting python 3.9 created #20384. |
nice!! after merge this, we could add the retries we have in the APM ITs elastic/apm-integration-testing#866 |
Nosetests has been in maintenance mode for years, its last release was released in 2015. Some functionality it uses from Python is going to be removed in upcoming versions. Use pytest to replace nosetests as testrunner. Features used from nose libraries are replaced by features from the Python standard library and from pytest. (cherry picked from commit a6e2e24)
Packages listed in current requirements.txt file cannot be installed in python 3.5 and 3.9: * Pillow doesn't have a candidate for 3.9, it was already removed in #20407, but added again by mistake in #16883. * zipp package needed by pytest works with different versions depending on the version of python, version that works with python 3.5 doesn't work with other versions.
Nosetests has been in maintenance mode for years, its last release was released in 2015. Some functionality it uses from Python is going to be removed in upcoming versions. Use pytest to replace nosetests as testrunner. Features used from nose libraries are replaced by features from the Python standard library and from pytest. (cherry picked from commit a6e2e24)
Nosetests has been in maintenance mode for years, its last release was released in 2015. Some functionality it uses from Python is going to be removed in upcoming versions. Use pytest to replace nosetests as testrunner. Features used from nose libraries are replaced by features from the Python standard library and from pytest.
Packages listed in current requirements.txt file cannot be installed in python 3.5 and 3.9: * Pillow doesn't have a candidate for 3.9, it was already removed in elastic#20407, but added again by mistake in elastic#16883. * zipp package needed by pytest works with different versions depending on the version of python, version that works with python 3.5 doesn't work with other versions.
What does this PR do?
Replaces nosetests with pytest.
Why is it important?
Nosetests has been in maintenance mode for years, its last release was done in 2015. When evolving the testing framework for Python tests it would be better to do it based on a maintained test tool. It will stop working with Python 3.9.
For #15891 I am considering adding new features to the testing framework that could include to add some plugin for the test tool, it wouldn't make sense to implement code based on a discontinued tool.
Pytest is a complete and well maintained test tool, it is one of the tools recommended after cease of nose project and it can be used as a direct replacement.
Checklist
Author checklist
Related issues