def test_removePunctuation_5(self):
     sent = "(def add1 (lambda (n)) + n 1)"
     self.assertEqual(textprocessing._removePunctuation(sent),
                      "def add1 lambda n  n 1")
 def test_removePunctuation_4(self):
     import string
     sent = string.punctuation
     self.assertEqual(textprocessing._removePunctuation(sent), "")
 def test_removePunctuation_3(self):
     sent = "Hi.There"
     self.assertEqual(textprocessing._removePunctuation(sent), "HiThere")
 def test_removePunctuation_2(self):
     sent = "helloself."
     self.assertEqual(textprocessing._removePunctuation(sent), "helloself")
 def test_removePunctuation_1(self):
     sent = ".?:"
     self.assertEqual(textprocessing._removePunctuation(sent), "")
Beispiel #6
0
 def test_removePunctuation_2(self):
     sent = 'helloself.'
     self.assertEqual(textprocessing._removePunctuation(sent), 'helloself')