@@ -982,40 +982,6 @@ def test119(self):
982982 self .m (hn .first , "God" , hn )
983983 self .m (hn .last , "Almighty" , hn )
984984
985- def test_last_name_is_also_title (self ):
986- hn = HumanName ("Amy E Maid" )
987- self .m (hn .first , "Amy" , hn )
988- self .m (hn .middle , "E" , hn )
989- self .m (hn .last , "Maid" , hn )
990-
991- def test_last_name_is_also_title2 (self ):
992- hn = HumanName ("Duke Martin Luther King, Jr." )
993- self .m (hn .title , "Duke" , hn )
994- self .m (hn .first , "Martin" , hn )
995- self .m (hn .middle , "Luther" , hn )
996- self .m (hn .last , "King" , hn )
997- self .m (hn .suffix , "Jr." , hn )
998-
999- def test_last_name_is_also_title3 (self ):
1000- hn = HumanName ("John King" )
1001- self .m (hn .first , "John" , hn )
1002- self .m (hn .last , "King" , hn )
1003-
1004- def test_title_with_conjunction (self ):
1005- hn = HumanName ("Secretary of State Hillary Clinton" )
1006- self .m (hn .title , "Secretary of State" , hn )
1007- self .m (hn .first , "Hillary" , hn )
1008- self .m (hn .last , "Clinton" , hn )
1009-
1010- def test_compound_title_with_conjunction (self ):
1011- hn = HumanName ("Cardinal Secretary of State Hillary Clinton" )
1012- self .m (hn .title , "Cardinal Secretary of State" , hn )
1013- self .m (hn .first , "Hillary" , hn )
1014- self .m (hn .last , "Clinton" , hn )
1015-
1016- def test_title_is_title (self ):
1017- hn = HumanName ("Coach" )
1018- self .m (hn .title , "Coach" , hn )
1019985
1020986
1021987class HumanNameConjunctionTestCase (HumanNameTestBase ):
@@ -1299,7 +1265,53 @@ def test_parenthesis_are_removed2(self):
12991265
13001266
13011267class HumanNameTitleTestCase (HumanNameTestBase ):
1302-
1268+ def test_last_name_is_also_title (self ):
1269+ hn = HumanName ("Amy E Maid" )
1270+ self .m (hn .first , "Amy" , hn )
1271+ self .m (hn .middle , "E" , hn )
1272+ self .m (hn .last , "Maid" , hn )
1273+
1274+ def test_last_name_is_also_title2 (self ):
1275+ hn = HumanName ("Duke Martin Luther King, Jr." )
1276+ self .m (hn .title , "Duke" , hn )
1277+ self .m (hn .first , "Martin" , hn )
1278+ self .m (hn .middle , "Luther" , hn )
1279+ self .m (hn .last , "King" , hn )
1280+ self .m (hn .suffix , "Jr." , hn )
1281+
1282+ def test_last_name_is_also_title3 (self ):
1283+ hn = HumanName ("John King" )
1284+ self .m (hn .first , "John" , hn )
1285+ self .m (hn .last , "King" , hn )
1286+
1287+ def test_title_with_conjunction (self ):
1288+ hn = HumanName ("Secretary of State Hillary Clinton" )
1289+ self .m (hn .title , "Secretary of State" , hn )
1290+ self .m (hn .first , "Hillary" , hn )
1291+ self .m (hn .last , "Clinton" , hn )
1292+
1293+ def test_compound_title_with_conjunction (self ):
1294+ hn = HumanName ("Cardinal Secretary of State Hillary Clinton" )
1295+ self .m (hn .title , "Cardinal Secretary of State" , hn )
1296+ self .m (hn .first , "Hillary" , hn )
1297+ self .m (hn .last , "Clinton" , hn )
1298+
1299+ def test_title_is_title (self ):
1300+ hn = HumanName ("Coach" )
1301+ self .m (hn .title , "Coach" , hn )
1302+
1303+ def test_suffix_with_single_comma_format (self ):
1304+ hn = HumanName ("John Doe jr., MD" )
1305+ self .m (hn .first , "John" , hn )
1306+ self .m (hn .last , "Doe" , hn )
1307+ self .m (hn .suffix , "jr., MD" , hn )
1308+
1309+ def test_suffix_with_double_comma_format (self ):
1310+ hn = HumanName ("Doe, John jr., MD" )
1311+ self .m (hn .first , "John" , hn )
1312+ self .m (hn .last , "Doe" , hn )
1313+ self .m (hn .suffix , "jr., MD" , hn )
1314+
13031315 # TODO: fix handling of U.S.
13041316 @unittest .expectedFailure
13051317 def test_chained_title_first_name_initial (self ):
0 commit comments