-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR #18303: Refactor test cases to improve unit test quality
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
- Loading branch information
1 parent
21c25fd
commit 79628a4
Showing
3 changed files
with
18 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters