Fix deprecation warnings

This commit is contained in:
Sebastian Ramacher 2021-01-23 08:51:46 +01:00
parent 98ddaecfd8
commit f56d0f631d

View file

@ -8,11 +8,11 @@ class Tests(unittest.TestCase):
): ):
if expected_length is None: if expected_length is None:
expected_length = sum(individual_expected_lengths) expected_length = sum(individual_expected_lengths)
self.assertEquals( self.assertEqual(
individual_expected_lengths, individual_expected_lengths,
tuple(map(wcwidth, phrase if n is None else phrase[:n])), tuple(map(wcwidth, phrase if n is None else phrase[:n])),
) )
self.assertEquals(expected_length, wcswidth(phrase, n)) self.assertEqual(expected_length, wcswidth(phrase, n))
def test_hello_jp(self): def test_hello_jp(self):
"""Width of Japanese phrase: コンニチハ, セカイ!""" """Width of Japanese phrase: コンニチハ, セカイ!"""