-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Enhancement: Refactor Test Code for Efficiency and Quality #1728
base: master
Are you sure you want to change the base?
Conversation
@freddiewanah: Thanks for the amazing work you've done and also for providing such an excellent context explaining the changes! |
Hi anadrianmanrique, thanks for prioritizing this PR. I'm mainly a researcher who works in detecting and refactoring test smells in Python projects. I think two common issues many open-source Python projects are facing are having too many assertions in one test case that will make them mega test cases and not utilizing the decorations provided by testing frameworks. If you are interested in these directions, I could work on this direction and contribute more. |
Signed-off-by: Han Wang <freddie.wanah@gmail.com>
I'm sorry about the assert error. It has been fixed and should have no errors. |
Description
As a first-time contributor with a background in researching Python unit tests, I conducted a thorough static analysis of the project's test code. This examination revealed various "test smells" that could potentially degrade both the efficiency and quality of our tests. To address these issues, I've refactored the relevant code segments. The modifications I propose not only aim to eliminate these inefficiencies but are also expected to reduce execution time within GitHub Actions. This reduction could contribute to lower operational costs for the project.
Test smells refactored:
I didn't change any of the testing logic or testing values. The refactoring only focuses on reducing the test smells.
Please feel free to let me know if you are interested in more refactoring like this or if there're any changes that you don't wish.