6c27899f55ebb1302c8ec89643ef554b0702b922
[utils.git] / src / budget_sync / test / test_config.py
1 import unittest
2 from budget_sync.config import Config, ConfigParseError
3
4
5 class TestConfig(unittest.TestCase):
6 def test_config_parsing(self):
7 def check_error(text: str, expected_error_text: str):
8 with self.assertRaises(ConfigParseError) as e:
9 Config.from_str(text)
10 self.assertEqual(str(e.exception), expected_error_text)
11
12 def check(text: str, expected_repr_text: str):
13 self.assertEqual(repr(Config.from_str(text)), expected_repr_text)
14
15 raise NotImplementedError("finish adding test cases")
16
17
18 if __name__ == "__main__":
19 unittest.main()