def test_hyphen_join(self): sc = StubSpellChecker(('dob', 'bob-', 'bob-dob', )) word_one = Word('bob-', sc) word_two = Word('dob', sc) word_two.prepend(word_one) self.assertEquals('', word_one.text) self.assertEquals('bob-dob', word_two.text)
def test_hyphen_join(self): sc = StubSpellChecker(( 'dob', 'bob-', 'bob-dob', )) word_one = Word('bob-', sc) word_two = Word('dob', sc) word_two.prepend(word_one) self.assertEquals('', word_one.text) self.assertEquals('bob-dob', word_two.text)
def test_hyphen_fix(self): sc = StubSpellChecker(('bellfast', )) word_one = Word('bell', sc) word_two = Word('fast', sc) word_two.prepend(word_one) self.assertEquals('', word_one.text) self.assertEquals('bellfast', word_two.text) word_one = Word('bell-', sc) word_two = Word('fast', sc) word_two.prepend(word_one) self.assertEquals('', word_one.text) self.assertEquals('bellfast', word_two.text) word_one = Word('belle', sc) word_two = Word('fast', sc) word_two.prepend(word_one) self.assertEquals('', word_one.text) self.assertEquals('bellfast', word_two.text)