From c5abb81f4c88c1327adb36682064e670d9ae4c29 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 1 Sep 2014 23:25:51 +0200 Subject: [PATCH] * Add incomplete tests of asciify function --- tests/test_asciify.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/test_asciify.py diff --git a/tests/test_asciify.py b/tests/test_asciify.py new file mode 100644 index 000000000..eed71a5f3 --- /dev/null +++ b/tests/test_asciify.py @@ -0,0 +1,18 @@ +# -*- coding: utf8 -*- + +from __future__ import unicode_literals +import pytest + +from spacy.orth import asciify + + +def test_tilde(): + string = u'hõmbre' + assert asciify(string) == u'hombre' + + +def test_smart_quote(): + string = u'“' + assert asciify(string) == '"' + string = u'”' + assert asciify(string) == '"'