super basic strutils tests

This commit is contained in:
Mahmoud Hashemi 2015-05-19 23:18:38 -07:00
parent 227ec414a8
commit 9007b6bd94
2 changed files with 10 additions and 7 deletions

View File

@ -564,10 +564,3 @@ def html2text(html):
s = HTMLTextExtractor() s = HTMLTextExtractor()
s.feed(html) s.feed(html)
return s.get_text() return s.get_text()
if __name__ == '__main__':
b = asciify(u'Beyoncé')
print(ord(unicode(b)[-1]))
print(b)
print(DEACCENT_MAP)

10
tests/test_strutils.py Normal file
View File

@ -0,0 +1,10 @@
# -*- coding: utf-8 -*-
from boltons.strutils import asciify
def test_asciify():
ref = u'Beyoncé'
b = asciify(ref)
assert len(b) == len(b)
assert b[-1:].decode('ascii') == 'e'