Mercurial > hgrepos > Python > libs > ConfigMix
comparison tests/test.py @ 127:5b62d2c0e5a8
Use the available "OrderedDict" class as dict for the JSON parser
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Wed, 04 Apr 2018 20:53:06 +0200 |
| parents | 21d92ff8cf31 |
| children | b11af3ded7c1 |
comparison
equal
deleted
inserted
replaced
| 126:93964bac7ef6 | 127:5b62d2c0e5a8 |
|---|---|
| 68 cfg = configmix.yaml.safe_load(f) | 68 cfg = configmix.yaml.safe_load(f) |
| 69 self.__check_types(cfg) | 69 self.__check_types(cfg) |
| 70 | 70 |
| 71 def test04_json_types(self): | 71 def test04_json_types(self): |
| 72 cfg = configmix.json.load(os.path.join(TESTDATADIR, "conf1.json")) | 72 cfg = configmix.json.load(os.path.join(TESTDATADIR, "conf1.json")) |
| 73 self.assertTrue(isinstance(cfg, configmix.json.DictImpl)) | |
| 73 self.__check_types(cfg) | 74 self.__check_types(cfg) |
| 74 | 75 |
| 75 def test05_py_export_all(self): | 76 def test05_py_export_all(self): |
| 76 # When __all__ is given only it's keys are exported | 77 # When __all__ is given only it's keys are exported |
| 77 cfg = configmix.py.load(os.path.join(TESTDATADIR, "conf2.py")) | 78 cfg = configmix.py.load(os.path.join(TESTDATADIR, "conf2.py")) |
