Fix invalid output of single-quoted scalars in cases when a single
[pyyaml/python3.git] / tests / test_recursive.py
blobacbd01b654e5fa6e2088e39290ef2e31e27dafa3
2 import unittest
3 from yaml import *
5 RECURSIVE = """
6 --- &A
7 - *A: *A
8 """
10 class TestRecursive(unittest.TestCase):
12 def testRecursive(self):
13 node = compose(RECURSIVE)
14 self._check(node)
15 document = serialize(node)
16 node = compose(document)
17 self._check(node)
19 def _check(self, node):
20 self.failUnless(node in node.value[0].value)
21 self.failUnless(node.value[0].value[node] is node)