Merge "Using assertIsNotNone() instead of assertNotEqual(None)"

This commit is contained in:
Jenkins 2016-11-18 00:39:44 +00:00 committed by Gerrit Code Review
commit b6f8648177
1 changed files with 3 additions and 3 deletions

View File

@ -64,11 +64,11 @@ actual =
matches = self.matches_matches matches = self.matches_matches
mismatches = self.matches_mismatches mismatches = self.matches_mismatches
for candidate in matches: for candidate in matches:
self.assertEqual(None, matcher.match(candidate)) self.assertIsNone(matcher.match(candidate))
for candidate in mismatches: for candidate in mismatches:
mismatch = matcher.match(candidate) mismatch = matcher.match(candidate)
self.assertNotEqual(None, mismatch) self.assertIsNotNone(mismatch)
self.assertNotEqual(None, getattr(mismatch, 'describe', None)) self.assertIsNotNone(getattr(mismatch, 'describe', None))
def test__str__(self): def test__str__(self):
# [(expected, object to __str__)]. # [(expected, object to __str__)].