1
2
3
4
5
6
7
8 from nltk_lite.contrib.classifier import item
9 import unittest
10
13 i = item.Item('f,g,h\n')
14 self.assertEqual('f,g,h', i.stripNewLineAndWhitespace())
15 i = item.Item('f, g , h')
16 self.assertEqual('f,g,h', i.stripNewLineAndWhitespace())
17 i = item.Item('f, g, h\n')
18 self.assertEqual('f,g,h', i.stripNewLineAndWhitespace())
19
23
27
31
33 i = item.NameItem('a ,b,c')
34 self.assertEqual('a,b,c', i.processed(), 'should not have whitespaces in the string')
35
37 i = item.NameItem('foo : a , b, c')
38 self.assertEqual('foo:a,b,c', i.processed(), 'should not have whitespaces in the string')
39