예제 #1
0
파일: test_dumper.py 프로젝트: ifwe/pysyck
 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))
예제 #2
0
파일: test_loader.py 프로젝트: ifwe/pysyck
 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)
예제 #3
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)