Trees | Indices | Help |
|
---|
|
1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 4 """tests decoration handling functions that are used by checks""" 5 6 from translate.filters import prefilters 79 assert prefilters.removekdecomments(u"Some sṱring") == u"Some sṱring" 10 assert prefilters.removekdecomments(u"_: Commenṱ\\n\nSome sṱring") == u"Some sṱring" 11 assert prefilters.removekdecomments(u"_: Commenṱ\\n\n") == u""1214 string = u"Nothing in here." 15 filtered = prefilters.filterwordswithpunctuation(string) 16 assert filtered == string 17 # test listed words (start / end with apostrophe) 18 string = u"'n Boom het 'n tak." 19 filtered = prefilters.filterwordswithpunctuation(string) 20 assert filtered == "n Boom het n tak." 21 # test words containing apostrophe 22 string = u"It's in it's own place." 23 filtered = prefilters.filterwordswithpunctuation(string) 24 assert filtered == "Its in its own place." 25 # test strings in unicode 26 string = u"Iṱ'š" 27 filtered = prefilters.filterwordswithpunctuation(string) 28 assert filtered == u"Iṱš"29
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Sep 23 13:51:36 2008 | http://epydoc.sourceforge.net |