示例#1
0
 def test_load_yaml_ordered_maintains_order(self):
     output = parser.load_yaml_ordered(self.valid_yaml)
     keys = output.keys()
     expected = ['key1', 'key2', 'list1']
     self.assertEqual(keys, expected,
         "Expected output.keys to be list like:\n %s, but got:\n %s" %
         (expected, keys))
示例#2
0
 def test_load_yaml_ordered_returns_OrderedDict(self):
     output = parser.load_yaml_ordered(self.valid_yaml)
     self.assert_(isinstance(output, OrderedDict))