diff --git a/boltons/strutils.py b/boltons/strutils.py index 0b003c5..bbc9d73 100644 --- a/boltons/strutils.py +++ b/boltons/strutils.py @@ -564,10 +564,3 @@ def html2text(html): s = HTMLTextExtractor() s.feed(html) return s.get_text() - - -if __name__ == '__main__': - b = asciify(u'Beyoncé') - print(ord(unicode(b)[-1])) - print(b) - print(DEACCENT_MAP) diff --git a/tests/test_strutils.py b/tests/test_strutils.py new file mode 100644 index 0000000..cfd21a0 --- /dev/null +++ b/tests/test_strutils.py @@ -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'