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