Example #1
0
    def testUnicode(self):
        buf = io.StringIO("""
- Ą
- Ę
---
- Ś
- Ć
  """)
        self.assertEqual(yaml.ReadManyFromFile(buf), [["Ą", "Ę"], ["Ś", "Ć"]])
Example #2
0
    def testSimple(self):
        buf = io.StringIO("""
foo: bar
---
quux: norf
---
thud: blargh
    """)

        expected = [
            {
                "foo": "bar",
            },
            {
                "quux": "norf",
            },
            {
                "thud": "blargh",
            },
        ]
        self.assertEqual(yaml.ReadManyFromFile(buf), expected)