summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2012-12-27 22:44:20 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2012-12-27 22:44:20 (GMT)
commitc90be30b0de9089e3abef0f288caf4a693f81356 (patch)
tree7ded438617a2acb54fea2e59bd39e70ad6646a35
parent8876145fabec7924981f36019f0c2e45f73fbad2 (diff)
downloadcpython-c90be30b0de9089e3abef0f288caf4a693f81356.zip
cpython-c90be30b0de9089e3abef0f288caf4a693f81356.tar.gz
cpython-c90be30b0de9089e3abef0f288caf4a693f81356.tar.bz2
Issue #16792: Use assertIs() to test identity.
-rw-r--r--Lib/test/test_int.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
index f1d4f95..b3b12e6 100644
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -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__()