# Path: cjktools/resources/zhuyin_table.py
# def _default_stream():
# def parse_lines(istream):
# def zhuyin_to_pinyin_table(istream=None):
# def pinyin_to_zhuyin_table(istream=None):
# def get_all_pinyin(istream=None):
# def pinyin_regex_pattern(istream=None):
# def zhuyin_regex_pattern(istream=None):


import re
import unittest
from six.moves import StringIO
from cjktools.resources import zhuyin_table
#  test_zhuyin_table.py
#  cjktools
#





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


class ZhuyinTableTestCase(unittest.TestCase):
    def setUp(self):
        self.data = '\n'.join(('ㄔㄚ cha',
                               'ㄅㄟ bei',
                               'ㄐㄧㄥ jing',
                               'ㄉㄚ da',
                               'ㄒㄩㄝ xue'))

    def test_zhuyin_to_pinyin(self):
        dict_obj = zhuyin_table.zhuyin_to_pinyin_table(
            StringIO(self.data)
        )
        self.assertEqual(dict_obj[u'ㄔㄚ'], u'cha')

    def test_pinyin_to_zhuyin(self):

# Path: cjktools/resources/zhuyin_table.py
# def _default_stream():
# def parse_lines(istream):
# def zhuyin_to_pinyin_table(istream=None):
# def pinyin_to_zhuyin_table(istream=None):
# def get_all_pinyin(istream=None):
# def pinyin_regex_pattern(istream=None):
# def zhuyin_regex_pattern(istream=None):


# Path: cjktools/tests/resources/test_zhuyin_table.py
import re
import unittest
from six.moves import StringIO
from cjktools.resources import zhuyin_table

#  test_zhuyin_table.py
#  cjktools
#





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


class ZhuyinTableTestCase(unittest.TestCase):
    def setUp(self):
        self.data = '\n'.join(('ㄔㄚ cha',
                               'ㄅㄟ bei',
                               'ㄐㄧㄥ jing',
                               'ㄉㄚ da',
                               'ㄒㄩㄝ xue'))

    def test_zhuyin_to_pinyin(self):
        dict_obj = zhuyin_table.zhuyin_to_pinyin_table(
            StringIO(self.data)
        )
        self.assertEqual(dict_obj[u'ㄔㄚ'], u'cha')

    def test_pinyin_to_zhuyin(self):

        dict_obj = zhuyin_table.pinyin_to_zhuyin_table(