Exemplo n.º 1
0
    def test_single_empty_mapping(self):
        single_empty_mapping = """\
blah:
"""
        out = yaml.load(yaml.emit(_process_stack(yaml.parse(single_empty_mapping))))
        self.assertEqual(out["blah"], None)
Exemplo n.º 2
0
    def test_empty(self):
        empty = """"""

        out = yaml.load(yaml.emit(_process_stack(empty)))
        self.assertEqual(out, None)
Exemplo n.º 3
0
    def test_mapping_with_item(self):
        single_mapping = """\
blah: not-blah
"""
        out = yaml.load(yaml.emit(_process_stack(yaml.parse(single_mapping))))
        self.assertEqual(out["blah"], "not-blah")