-
Notifications
You must be signed in to change notification settings - Fork 1.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
HYGIENE: Using assertIsInstance, assertIs, assertIsNone, assertIsNotNone when relevant #2364
Merged
Commits on Sep 20, 2016
-
Replacing assertTrue(isinstance(...)) with assertIsInstance.
Did this using: https://gist.github.com/dhermes/57e29d96b17a4e1543b47bd2fcebfc07 NOTE: Some usage that span multiple lines are still not changed.
Configuration menu - View commit details
-
Copy full SHA for b990bfa - Browse repository at this point
Copy the full SHA b990bfaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 944e58d - Browse repository at this point
Copy the full SHA 944e58dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66ea44d - Browse repository at this point
Copy the full SHA 66ea44dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67d0385 - Browse repository at this point
Copy the full SHA 67d0385View commit details -
Configuration menu - View commit details
-
Copy full SHA for d07db3c - Browse repository at this point
Copy the full SHA d07db3cView commit details -
Replacing remaining assertTrue(... is ...) with assertIs(..., ...).
Done manually by checking the output of: $ git grep ' is$' -- unit_tests/ $ git grep ' is$' -- system_tests/ $ git grep ' is ' -- unit_tests/ $ git grep ' is ' -- system_tests/
Configuration menu - View commit details
-
Copy full SHA for 24aa6e7 - Browse repository at this point
Copy the full SHA 24aa6e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f06350 - Browse repository at this point
Copy the full SHA 3f06350View commit details -
Replacing assertEqual(..., None) with assertIsNone(...).
Did this using: https://gist.github.com/dhermes/f4176452c2436b14e0c97a114d98bace Also had to manually undo a few of the changes since the regex matched things like self.assertEqual(foo, [(value, has_some, parens, None)])
Configuration menu - View commit details
-
Copy full SHA for 2c273f0 - Browse repository at this point
Copy the full SHA 2c273f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 206045f - Browse repository at this point
Copy the full SHA 206045fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.