summaryrefslogtreecommitdiff
path: root/Lib/test/test_int.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2012-12-28 00:32:19 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2012-12-28 00:32:19 +0200
commit8876145fabec7924981f36019f0c2e45f73fbad2 (patch)
treeb1deaa1df7385024bdc3e7093c442421f09411f1 /Lib/test/test_int.py
parent270767b2ceb5452d052b280eb1b174d7a32d43f5 (diff)
downloadcpython-git-8876145fabec7924981f36019f0c2e45f73fbad2.tar.gz
Issue #16793. Replace deprecated unittest asserts with modern counterparts.
Diffstat (limited to 'Lib/test/test_int.py')
-rw-r--r--Lib/test/test_int.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
index 099640a1cf..f1d4f95821 100644
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -347,8 +347,8 @@ class IntTestCases(IntLongCommonTests, unittest.TestCase):
for x in values:
msg = 'x has value %s and type %s' % (x, type(x).__name__)
try:
- self.assertEquals(int(x), 100, msg=msg)
- self.assertEquals(int(x, 2), 4, msg=msg)
+ self.assertEqual(int(x), 100, msg=msg)
+ self.assertEqual(int(x, 2), 4, msg=msg)
except TypeError, err:
raise AssertionError('For %s got TypeError: %s' %
(type(x).__name__, err))
@@ -373,10 +373,10 @@ class IntTestCases(IntLongCommonTests, unittest.TestCase):
# expects x to be a string if base is given.
@test_support.cpython_only
def test_int_base_without_x_returns_0(self):
- self.assertEquals(int(base=6), 0)
+ self.assertEqual(int(base=6), 0)
# Even invalid bases don't raise an exception.
- self.assertEquals(int(base=1), 0)
- self.assertEquals(int(base=1000), 0)
+ self.assertEqual(int(base=1), 0)
+ self.assertEqual(int(base=1000), 0)
@test_support.cpython_only
def test_small_ints(self):