| | 344 | class TestNodesReduce(unittest.TestCase): |
| | 345 | |
| | 346 | def testNodesReduce(self): |
| | 347 | object = syck.load(NODES) |
| | 348 | nodes = syck.parse(NODES) |
| | 349 | output = syck.dump(nodes) |
| | 350 | print output |
| | 351 | nodes2 = syck.load(output) |
| | 352 | output2 = syck.emit(nodes2) |
| | 353 | object2 = syck.load(output2) |
| | 354 | self.assertEqual(object, object2) |
| | 355 | |
| | 356 | def testBuggyNodesReduce(self): |
| | 357 | object = syck.load(BUGGY_NODES) |
| | 358 | nodes = syck.parse(BUGGY_NODES) |
| | 359 | output = syck.dump(nodes) |
| | 360 | print output |
| | 361 | nodes2 = syck.load(output) |
| | 362 | output2 = syck.emit(nodes2) |
| | 363 | object2 = syck.load(output2) |
| | 364 | self.assertEqual(object, object2) |
| | 365 | |