Esempio n. 1
0
 def test_empty(self):
     self.assertEqual(strip_punctuation(''), '')
Esempio n. 2
0
 def test_stripall(self):
     s = '!@#$%^<\'}{>&/?*[]()-_=+"`~'
     self.assertEqual(strip_punctuation(s), '')
Esempio n. 3
0
 def test_stripsome(self):
     s = '!@#$f%^o<\'o }{>b&/?a*r[]()-_=+"`~'
     self.assertEqual(strip_punctuation(s), 'foo bar')
Esempio n. 4
0
 def test_stripnone(self):
     s = 'the quick brown fox jumped far'
     self.assertEqual(strip_punctuation(s), s)