Exemple #1
0
 def test_strip_punctuation(self):
     assert_equal(
         utils.strip_punctuation('abcde aeiou'),
         'abcde aeiou'
     )
     assert_equal(
         utils.strip_punctuation("abcde.' aeiou"),
         'abcde aeiou'
     )
Exemple #2
0
    def __init__(self, fullname):
        ascii_name = make_ascii(fullname)
        super(Name, self).__init__(ascii_name)

        # Format after parsing to preserve parsing logic
        self.title = strip_punctuation(self.title)
        self.first = strip_punctuation(self.first)
        self.middle = strip_punctuation(self.middle)
        self.last = strip_punctuation(self.last)
        self.suffix = strip_punctuation(self.suffix)
        self.nickname = strip_punctuation(self.nickname)
Exemple #3
0
    def __init__(self, fullname):
        ascii_name = make_ascii(fullname)
        super(Name, self).__init__(ascii_name)

        # Format after parsing to preserve parsing logic
        self.title = strip_punctuation(self.title)
        self.first = strip_punctuation(self.first)
        self.middle = strip_punctuation(self.middle)
        self.last = strip_punctuation(self.last)
        self.suffix = strip_punctuation(self.suffix)
        self.nickname = strip_punctuation(self.nickname)