Skip to content
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

Refactor test cases to improve unit test quality #3302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

freddiewanah
Copy link

Summary

Hello, first PR here.

This PR improves the readability of the assert statements in unit tests by using more expressive assert methods from Python's unittest module. These changes improve code quality (avoid test smells) by:

  • Making the assert statements more readable. For example, it's quicker to understand assertFalse(x) than assertEquals(x, False).

  • Simplifying code management. For example, instead of simply saying 0.2, use the parameter name(poll_response_timeout) so that developers could only update the value in one place.

Happy to update more related issues in the test code if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant