40
40
41
41
class HumanNameTestBase (unittest .TestCase ):
42
42
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"""
44
44
expected = expected or hn .C .empty_attribute_default
45
45
try :
46
46
self .assertEqual (actual , expected , "'%s' != '%s' for '%s'\n %r" % (
@@ -50,7 +50,7 @@ def m(self, actual, expected, hn):
50
50
hn
51
51
))
52
52
except UnicodeDecodeError :
53
- self .assertEquals (actual , expected )
53
+ self .assertEqual (actual , expected )
54
54
55
55
56
56
class HumanNamePythonTests (HumanNameTestBase ):
@@ -62,8 +62,6 @@ def test_utf8(self):
62
62
63
63
def test_string_output (self ):
64
64
hn = HumanName ("de la Véña, Jüan" )
65
- print (hn )
66
- print (repr (hn ))
67
65
68
66
def test_escaped_utf8_bytes (self ):
69
67
hn = HumanName (b'B\xc3 \xb6 ck, Gerald' )
@@ -1267,7 +1265,7 @@ class ConstantsCustomization(HumanNameTestBase):
1267
1265
def test_add_title (self ):
1268
1266
hn = HumanName ("Te Awanui-a-Rangi Black" , constants = None )
1269
1267
start_len = len (hn .C .titles )
1270
- self .assert_ (start_len > 0 )
1268
+ self .assertTrue (start_len > 0 )
1271
1269
hn .C .titles .add ('te' )
1272
1270
self .assertEqual (start_len + 1 , len (hn .C .titles ))
1273
1271
hn .parse_full_name ()
@@ -1278,7 +1276,7 @@ def test_add_title(self):
1278
1276
def test_remove_title (self ):
1279
1277
hn = HumanName ("Hon Solo" , constants = None )
1280
1278
start_len = len (hn .C .titles )
1281
- self .assert_ (start_len > 0 )
1279
+ self .assertTrue (start_len > 0 )
1282
1280
hn .C .titles .remove ('hon' )
1283
1281
self .assertEqual (start_len - 1 , len (hn .C .titles ))
1284
1282
hn .parse_full_name ()
0 commit comments