# Path: cjktools/resources/pinyin_table.py
# class PinyinFormatError(Exception):
# class PinyinTable(dict):
# class PinyinSegmenter(object):
#     def __init__(self):
#     def from_hanzi(self, hanzi_string, inline=True, use_tones=True):
#     def from_ascii(self, ascii_pinyin):
#     def strip_tones(self, ascii_pinyin):
#     def _apply_tone(self, syllable, tone):
#     def __init__(self):
#     def segment_pinyin(self, pinyin_string):
#     def is_pinyin(self, symbol_string):
# def normalize(ascii_pinyin):
# def get_pinyin_table():
# def get_pinyin_segmenter():


import unittest
from cjktools.resources import pinyin_table
# -*- coding: utf-8 -*-
#
#  test_pinyin_table.py
#  cjktools
#

from __future__ import unicode_literals



def suite():
    test_suite = unittest.TestSuite((
        unittest.makeSuite(PinyinTableTestCase)
    ))
    return test_suite


class PinyinTableTestCase(unittest.TestCase):
    def setUp(self):
        pass

    def test_pinyin_table(self):
        # Tests simple conversion from hanzi to unicode pinyin.
        table = pinyin_table.get_pinyin_table()
        self.assertEqual(table.from_hanzi('一代风流'), 'yīdàifēnglíu')

    def test_ascii_pinyin(self):
        # Test simple conversion from ascii to unicode pinyin.

# Path: cjktools/resources/pinyin_table.py
# class PinyinFormatError(Exception):
# class PinyinTable(dict):
# class PinyinSegmenter(object):
#     def __init__(self):
#     def from_hanzi(self, hanzi_string, inline=True, use_tones=True):
#     def from_ascii(self, ascii_pinyin):
#     def strip_tones(self, ascii_pinyin):
#     def _apply_tone(self, syllable, tone):
#     def __init__(self):
#     def segment_pinyin(self, pinyin_string):
#     def is_pinyin(self, symbol_string):
# def normalize(ascii_pinyin):
# def get_pinyin_table():
# def get_pinyin_segmenter():


# Path: cjktools/tests/resources/test_pinyin_table.py
import unittest
from cjktools.resources import pinyin_table

# -*- coding: utf-8 -*-
#
#  test_pinyin_table.py
#  cjktools
#

from __future__ import unicode_literals



def suite():
    test_suite = unittest.TestSuite((
        unittest.makeSuite(PinyinTableTestCase)
    ))
    return test_suite


class PinyinTableTestCase(unittest.TestCase):
    def setUp(self):
        pass

    def test_pinyin_table(self):
        # Tests simple conversion from hanzi to unicode pinyin.
        table = pinyin_table.get_pinyin_table()
        self.assertEqual(table.from_hanzi('一代风流'), 'yīdàifēnglíu')

    def test_ascii_pinyin(self):
        # Test simple conversion from ascii to unicode pinyin.

        s = pinyin_table.get_pinyin_table()