mirror of https://github.com/mahmoud/boltons.git
super basic strutils tests
This commit is contained in:
parent
227ec414a8
commit
9007b6bd94
|
@ -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)
|
|
||||||
|
|
|
@ -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'
|
Loading…
Reference in New Issue