import unittest

class Test(unittest.TestCase):
    def test(self):
        from zhongwen.數 import 取數值

        self.assertEqual(取數值('中間一二三數字'), 123)
        self.assertEqual(取數值('中間一二三數字246'), 123)
        self.assertEqual(取數值('中間一二三數字2.46', 全取=True), [123, 2.46])


if __name__ == '__main__':
    import logging
    logging.basicConfig(level=logging.INFO)
    logging.getLogger('googleclient').setLevel(logging.CRITICAL)
    logging.getLogger('matplotlib').setLevel(logging.CRITICAL)
    logging.getLogger('faker').setLevel(logging.CRITICAL)
    unittest.main()
    suite = unittest.TestSuite()
    suite.addTest(Test('test'))  # 指定測試
    unittest.TextTestRunner().run(suite)
