]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #16792: Use assertIs() to test identity.
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 27 Dec 2012 22:44:20 +0000 (00:44 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 27 Dec 2012 22:44:20 +0000 (00:44 +0200)
Lib/test/test_int.py

index f1d4f95821f5dac2e7ddd2b198c611e36627acc7..b3b12e651df179124f8f5df3790414a1d8e53f5c 100644 (file)
@@ -380,11 +380,11 @@ class IntTestCases(IntLongCommonTests, unittest.TestCase):
 
     @test_support.cpython_only
     def test_small_ints(self):
-        self.assertTrue(int('10') is 10)
-        self.assertTrue(int('-1') is -1)
+        self.assertIs(int('10'), 10)
+        self.assertIs(int('-1'), -1)
         if have_unicode:
-            self.assertTrue(int(u'10') is 10)
-            self.assertTrue(int(u'-1') is -1)
+            self.assertIs(int(u'10'), 10)
+            self.assertIs(int(u'-1'), -1)
 
     def test_intconversion(self):
         # Test __int__()