2014-09-01 21:25:51 +00:00
|
|
|
# -*- coding: utf8 -*-
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import pytest
|
|
|
|
|
2014-09-10 16:27:44 +00:00
|
|
|
from spacy.orth import asciied
|
2014-09-01 21:25:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_tilde():
|
|
|
|
string = u'hõmbre'
|
2015-01-05 14:03:29 +00:00
|
|
|
assert asciied(string) == b'hombre'
|
2014-09-01 21:25:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_smart_quote():
|
|
|
|
string = u'“'
|
2015-01-05 14:03:29 +00:00
|
|
|
assert asciied(string) == b'"'
|
2015-01-05 14:09:44 +00:00
|
|
|
string = u'”'
|
2015-01-05 14:03:29 +00:00
|
|
|
assert asciied(string) == b'"'
|