diff tests/test.py @ 134:2f2e819e8d17

Check the return type of the JSON and YAML loading functions: they must be a dict alike
author Franz Glasner <hg@dom66.de>
date Thu, 05 Apr 2018 09:12:29 +0200
parents b11af3ded7c1
children d8d47893df5b
line wrap: on
line diff
--- a/tests/test.py	Wed Apr 04 23:51:07 2018 +0200
+++ b/tests/test.py	Thu Apr 05 09:12:29 2018 +0200
@@ -66,6 +66,8 @@
         with io.open(os.path.join(TESTDATADIR, "conf1.yml"), "rt",
                      encoding="utf-8") as f:
             cfg = configmix.yaml.safe_load(f)
+            if configmix.yaml.OrderedDict:
+                self.assertTrue(isinstance(cfg, configmix.yaml.OrderedDict))
             self.__check_types(cfg)
 
     def test04_json_types(self):