Commit c90be30b authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #16792: Use assertIs() to test identity.

parent 8876145f
...@@ -380,11 +380,11 @@ class IntTestCases(IntLongCommonTests, unittest.TestCase): ...@@ -380,11 +380,11 @@ class IntTestCases(IntLongCommonTests, unittest.TestCase):
@test_support.cpython_only @test_support.cpython_only
def test_small_ints(self): def test_small_ints(self):
self.assertTrue(int('10') is 10) self.assertIs(int('10'), 10)
self.assertTrue(int('-1') is -1) self.assertIs(int('-1'), -1)
if have_unicode: if have_unicode:
self.assertTrue(int(u'10') is 10) self.assertIs(int(u'10'), 10)
self.assertTrue(int(u'-1') is -1) self.assertIs(int(u'-1'), -1)
def test_intconversion(self): def test_intconversion(self):
# Test __int__() # Test __int__()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment