-
Notifications
You must be signed in to change notification settings - Fork 19.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
Refactor test cases to improve unit test quality #18303
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Hi @freddiewanah, thank you for the PR! Test changes look good.
Imported from GitHub PR #18303 Hello, first-time submitting PR here. I've read through the contributor guide and figured it's a minor update, hence this PR. This PR improves the readability of the assert statements in some of the unit tests by using more expressive assert methods from the unittest module. These changes improve code quality (avoid test smells) by: - Making the assert statements more readable and consistent with other asserts in the same test file, i.e., assertLen. Happy to update more related issues in the test code if needed :) Copybara import of the project: -- d823be2 by freddiewanah <[email protected]>: Refactor test cases to improve unit test quality -- ddeff03 by freddiewanah <[email protected]>: revert assertRaisesRegex Merging this change closes #18303 FUTURE_COPYBARA_INTEGRATE_REVIEW=#18303 from freddiewanah:master ddeff03 PiperOrigin-RevId: 551893138
Imported from GitHub PR #18303 Hello, first-time submitting PR here. I've read through the contributor guide and figured it's a minor update, hence this PR. This PR improves the readability of the assert statements in some of the unit tests by using more expressive assert methods from the unittest module. These changes improve code quality (avoid test smells) by: - Making the assert statements more readable and consistent with other asserts in the same test file, i.e., assertLen. Happy to update more related issues in the test code if needed :) Copybara import of the project: -- d823be2 by freddiewanah <[email protected]>: Refactor test cases to improve unit test quality -- ddeff03 by freddiewanah <[email protected]>: revert assertRaisesRegex Merging this change closes #18303 FUTURE_COPYBARA_INTEGRATE_REVIEW=#18303 from freddiewanah:master ddeff03 PiperOrigin-RevId: 551893138
Hello, first-time submitting PR here. I've read through the contributor guide and figured it's a minor update, hence this PR.
This PR improves the readability of the assert statements in some of the unit tests by using more expressive assert methods from the unittest module. These changes improve code quality (avoid test smells) by:
Happy to update more related issues in the test code if needed :)