def testMultipleDicts(self): dumped = yaml.DumpMany([ collections.OrderedDict([("foo", 42), ("bar", 108)]), collections.OrderedDict([("quux", "norf"), ("thud", "blargh")]), ]) expected = """\ foo: 42 bar: 108 --- quux: norf thud: blargh """ self.assertEqual(dumped, expected)
def testUnicode(self): dumped = yaml.DumpMany([ { "gąszcz": "żuk" }, { "gęstwina": "chrabąszcz" }, ]) expected = """\ gąszcz: żuk --- gęstwina: chrabąszcz """ self.assertEqual(dumped, expected)