def test_valid_cast_to_string_after_parse(self):
    print ''
    print 'TEST CAST TO STRING'
    print '==================='
    print ''

    num_correct = 0
    for example in VALID_EXAMPLES:
      protocol_data = protocol.parse(example.protocol_string)
      try:
        try:
          protocol.parse(str(protocol_data))
          debug_msg = "%s: STRING CAST SUCCESS" % example.name
          num_correct += 1
        except:
          debug_msg = "%s: STRING CAST FAILURE" % example.name
      finally:
        print debug_msg

    fail_msg = "Cast to string success on %d out of %d protocols" % \
      (num_correct, len(VALID_EXAMPLES))
    self.assertEqual(num_correct, len(VALID_EXAMPLES), fail_msg)
Yields the sentence as an XML-formatted string (plain bytestring, UTF-8 encoded).
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/avro-1.7.6/test/test_protocol.py/TestProtocol.test_valid_cast_to_string_after_parse--crossover with--dataset/ETHPy150Open markuskiller/textblob-de/textblob_de/ext/_pattern/text/tree.py/Sentence.xml