4040
4141class HumanNameTestBase (unittest .TestCase ):
4242 def m (self , actual , expected , hn ):
43- """assertEquals with a better message and awareness of hn.C.empty_attribute_default"""
43+ """assertEqual with a better message and awareness of hn.C.empty_attribute_default"""
4444 expected = expected or hn .C .empty_attribute_default
4545 try :
4646 self .assertEqual (actual , expected , "'%s' != '%s' for '%s'\n %r" % (
@@ -50,7 +50,7 @@ def m(self, actual, expected, hn):
5050 hn
5151 ))
5252 except UnicodeDecodeError :
53- self .assertEquals (actual , expected )
53+ self .assertEqual (actual , expected )
5454
5555
5656class HumanNamePythonTests (HumanNameTestBase ):
@@ -62,8 +62,6 @@ def test_utf8(self):
6262
6363 def test_string_output (self ):
6464 hn = HumanName ("de la Véña, Jüan" )
65- print (hn )
66- print (repr (hn ))
6765
6866 def test_escaped_utf8_bytes (self ):
6967 hn = HumanName (b'B\xc3 \xb6 ck, Gerald' )
@@ -1267,7 +1265,7 @@ class ConstantsCustomization(HumanNameTestBase):
12671265 def test_add_title (self ):
12681266 hn = HumanName ("Te Awanui-a-Rangi Black" , constants = None )
12691267 start_len = len (hn .C .titles )
1270- self .assert_ (start_len > 0 )
1268+ self .assertTrue (start_len > 0 )
12711269 hn .C .titles .add ('te' )
12721270 self .assertEqual (start_len + 1 , len (hn .C .titles ))
12731271 hn .parse_full_name ()
@@ -1278,7 +1276,7 @@ def test_add_title(self):
12781276 def test_remove_title (self ):
12791277 hn = HumanName ("Hon Solo" , constants = None )
12801278 start_len = len (hn .C .titles )
1281- self .assert_ (start_len > 0 )
1279+ self .assertTrue (start_len > 0 )
12821280 hn .C .titles .remove ('hon' )
12831281 self .assertEqual (start_len - 1 , len (hn .C .titles ))
12841282 hn .parse_full_name ()
0 commit comments