def test_author_3parts(self): guesses = normalize_author('Adolfo Bioy Casares') self.assertIn('Adolfo Bioy Casares', guesses) self.assertIn('Adolfo B. Casares', guesses) self.assertIn('A. B. Casares', guesses) self.assertIn('Adolfo Casares', guesses) self.assertIn('A. Casares', guesses)
def test_smoke4(self): guesses = normalize_author('A.G. Riddle') self.assertIn('A. G. Riddle', guesses) self.assertIn('A. Riddle', guesses)
def test_smoke2(self): guesses = normalize_author('Simon GOOGWILL') self.assertIn('Simon Googwill', guesses) self.assertIn('S. Googwill', guesses)
def test_author_van_or_Van(self): guesses = normalize_author('Alfred E Van Vogt') self.assertIn('Alfred E. Van Vogt', guesses) self.assertIn('Alfred E. van Vogt', guesses) self.assertIn('A. E. Van Vogt', guesses) self.assertIn('A. E. V. Vogt', guesses)
def test_author_forgetadot(self): guesses = normalize_author('Alfred E van Vogt') self.assertIn('Alfred E. Van Vogt', guesses) self.assertIn('Alfred E. van Vogt', guesses) self.assertIn('A. E. Van Vogt', guesses) self.assertIn('A. E. V. Vogt', guesses)
def test_author_2initiales2(self): guesses = normalize_author('Ruth L.C. Simms') self.assertIn('Ruth L. C. Simms', guesses) self.assertIn('Ruth Simms', guesses) self.assertIn('R. L. C. Simms', guesses) self.assertIn('R. Simms', guesses)