Example #1
0
 def testFileDocument(self):
     output = StringIO.StringIO()
     syck.emit_documents(self._get_examples(), output)
     output.seek(0)
     nodes = syck.parse_documents(output)
     self.assertEqual(map(test_emitter.strip, self._get_examples()),
             map(test_emitter.strip, nodes))
Example #2
0
 def _testDocuments(self, source, length):
     actual_length = len(list(syck.load_documents(source)))
     self.assertEqual(actual_length, length)
     actual_length = len(list(syck.parse_documents(source)))
     self.assertEqual(actual_length, length)
 def _testDocuments(self, source, length):
     actual_length = len(list(syck.load_documents(source)))
     self.assertEqual(actual_length, length)
     actual_length = len(list(syck.parse_documents(source)))
     self.assertEqual(actual_length, length)