# -*- coding: utf-8 -*-
from unittest import TestCase
from preprocessings.ja.normalization import normalize_unicode


class TestNormalizeUnicode(TestCase):

    def test_normalize_unicode(self):
        text = 'ＢＣＤ'  # 全角アルファベット
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'BCD')
        text = 'ｂｃｄ'  # 全角アルファベット
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'bcd')
        text = 'CAT'  # 半角アルファベット
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'CAT')
        text = 'cat'  # 半角アルファベット
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'cat')
        text = 'ネコ'
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'ネコ')
        text = 'ねこ'
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'ねこ')
        text = '猫'
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, '猫')
        text = 'ﾈｺ'
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, 'ネコ')
        text = '　'  # 全角スペース
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, ' ')
        text = '＠'  # 全角アットマーク
        normalized_text = normalize_unicode(text)
        self.assertEqual(normalized_text, '@')

@@ -108,16 +108,28 @@
 _unicode
+, lower_text
 %0A%0A%0Aclass
@@ -1456,8 +1456,153 @@
 t, '@')%0A
+%0A    def test_lower_text(self):%0A        text = 'ABc'%0A        normalized_text = lower_text(text)%0A        self.assertEqual(normalized_text, 'abc')%0A

add test case: lower text