-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace unittest assert methods by assert statement (#5386)
... continuing the test suite migration to `pytest` (#5361), this PR replaces `unittest` method assertions with `assert` statement. See the table below for a list of the replaced methods and their counts. This should help clarify the size of the pull request 😆. To keep things simple for the review, I have replaced each method in its own commit. This way, things should be easy to follow if you step through the commits one by one. 🙂 method | count --- | --- **`assertEqual`** | 1747 **`assertIn`** | 200 **`assertTrue`** | 149 **`assertIsNone`** | 87 **`assertFalse`** | 85 **`assertRaises`** | 69 **`assertNotIn`** | 64 **`assertNotEqual`** | 39 **`assertIsNotNone`** | 35 **`assertIsInstance`** | 35 **`assertLessEqual`** | 23 **`assertGreater`** | 15 **`assertLess`** | 14 **`assertGreaterEqual`** | 14 **`assertAlmostEqual`** | 9 **`assertRaisesRegex`** | 4 **`assertCountEqual`** | 2 **`assertListEqual`** | 1 ❗ Note that this *only* replaces methods provided by `unittest` by default. **Custom** assertion method replacements (like `assertExists` will be addressed in a separate PR).
- Loading branch information
Showing
70 changed files
with
2,963 additions
and
3,271 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
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
Oops, something went wrong.