Exemplo n.º 1
0
 def test_extract_apostrophe_words_string_without_apostrophe_words(self):
     self.assertEqual(ParseTools.extract_apostrophe_words(""), [])
     self.assertEqual(
         ParseTools.extract_apostrophe_words(
             "This sentence has no words with an apostrophe"), [])
     self.assertEqual(ParseTools.extract_apostrophe_words("and'"), [])
     self.assertEqual(ParseTools.extract_apostrophe_words("'and"), [])
Exemplo n.º 2
0
 def test_extract_apostrophe_words_string_with_apostrophe_words(self):
     self.assertEqual(
         ParseTools.extract_apostrophe_words(
             "This sentence's got a word with an apostrophe"),
         ["sentence's"])
     self.assertEqual(ParseTools.extract_apostrophe_words("doesn't"),
                      ["doesn't"])
     self.assertEqual(ParseTools.extract_apostrophe_words("'don't'"),
                      ["don't"])