class_docstr: Base class for testing descriptor sources.
code: def testWithFileDescriptorSet(self):
      # First try parsing with a local proto db, which should fail.
      with self.assertRaisesOpError(
          "No descriptor found for message type"
      ):
          self._testRoundtrip(b"local://")
  
      # Now try parsing with a FileDescriptorSet which contains the test proto.
      proto = self._createDescriptorProto()
      proto_file = self._writeProtoToFile(proto)
      self._testRoundtrip(proto_file)
  
      # Finally, try parsing the descriptor as a serialized string.
      self._testRoundtrip(b"bytes://" + proto.SerializeToString())
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/proto/descriptor_source_test_base.py
imports: import os
  import numpy
  from google.protobuf.descriptor_pb2 import FieldDescriptorProto
  from google.protobuf.descriptor_pb2 import FileDescriptorSet
  from tensorflow.python.framework import dtypes
  from tensorflow.python.kernel_tests.proto import proto_op_test_base
  from tensorflow.python.platform import test
label_desc: Use image node_id 5 for calling the DescriptorSourceTestBase obj's underlying member method code with example usage: obj.testWithFileDescriptorSet() without return types