summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-11-20 19:04:17 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-11-20 19:04:17 (GMT)
commitb3aedd48621ed9d33b5f42f946b256bce4a50673 (patch)
tree2297c8ebce1b09621e1d98096c1603896d9a0f0c /Lib/test/test_unicode.py
parentb8bc439b2093add9b313bcca2cc507a2d0e87764 (diff)
downloadcpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.zip
cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.gz
cpython-b3aedd48621ed9d33b5f42f946b256bce4a50673.tar.bz2
#9424: Replace deprecated assert* methods in the Python test suite.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index b2794fd..8f50800 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1442,24 +1442,24 @@ class UnicodeTest(string_tests.CommonTest,
from ctypes import c_wchar, sizeof
wchar, size = unicode_aswidechar('abcdef', 2)
- self.assertEquals(size, 2)
- self.assertEquals(wchar, 'ab')
+ self.assertEqual(size, 2)
+ self.assertEqual(wchar, 'ab')
wchar, size = unicode_aswidechar('abc', 3)
- self.assertEquals(size, 3)
- self.assertEquals(wchar, 'abc')
+ self.assertEqual(size, 3)
+ self.assertEqual(wchar, 'abc')
wchar, size = unicode_aswidechar('abc', 4)
- self.assertEquals(size, 3)
- self.assertEquals(wchar, 'abc\0')
+ self.assertEqual(size, 3)
+ self.assertEqual(wchar, 'abc\0')
wchar, size = unicode_aswidechar('abc', 10)
- self.assertEquals(size, 3)
- self.assertEquals(wchar, 'abc\0')
+ self.assertEqual(size, 3)
+ self.assertEqual(wchar, 'abc\0')
wchar, size = unicode_aswidechar('abc\0def', 20)
- self.assertEquals(size, 7)
- self.assertEquals(wchar, 'abc\0def\0')
+ self.assertEqual(size, 7)
+ self.assertEqual(wchar, 'abc\0def\0')
nonbmp = chr(0x10ffff)
if sizeof(c_wchar) == 2:
@@ -1469,8 +1469,8 @@ class UnicodeTest(string_tests.CommonTest,
buflen = 2
nchar = 1
wchar, size = unicode_aswidechar(nonbmp, buflen)
- self.assertEquals(size, nchar)
- self.assertEquals(wchar, nonbmp + '\0')
+ self.assertEqual(size, nchar)
+ self.assertEqual(wchar, nonbmp + '\0')
# Test PyUnicode_AsWideCharString()
def test_aswidecharstring(self):
@@ -1478,12 +1478,12 @@ class UnicodeTest(string_tests.CommonTest,
from ctypes import c_wchar, sizeof
wchar, size = unicode_aswidecharstring('abc')
- self.assertEquals(size, 3)
- self.assertEquals(wchar, 'abc\0')
+ self.assertEqual(size, 3)
+ self.assertEqual(wchar, 'abc\0')
wchar, size = unicode_aswidecharstring('abc\0def')
- self.assertEquals(size, 7)
- self.assertEquals(wchar, 'abc\0def\0')
+ self.assertEqual(size, 7)
+ self.assertEqual(wchar, 'abc\0def\0')
nonbmp = chr(0x10ffff)
if sizeof(c_wchar) == 2:
@@ -1491,8 +1491,8 @@ class UnicodeTest(string_tests.CommonTest,
else: # sizeof(c_wchar) == 4
nchar = 1
wchar, size = unicode_aswidecharstring(nonbmp)
- self.assertEquals(size, nchar)
- self.assertEquals(wchar, nonbmp + '\0')
+ self.assertEqual(size, nchar)
+ self.assertEqual(wchar, nonbmp + '\0')
def test_main():