compare singletons by identity not equality (closes #16712)

Patch from Serhiy Storchaka.
This commit is contained in:
Benjamin Peterson 2012-10-09 11:16:03 -04:00
parent a511935151
commit b29614e047
9 changed files with 15 additions and 15 deletions

View file

@ -736,7 +736,7 @@ class TestCase(object):
msg: Optional message to use on failure instead of a list of
differences.
"""
if seq_type != None:
if seq_type is not None:
seq_type_name = seq_type.__name__
if not isinstance(seq1, seq_type):
raise self.failureException('First sequence is not a %s: %s'