Classes | Functions | Variables
google.protobuf.internal.test_util Namespace Reference

Classes

class  NonStandardInteger
 

Functions

def ExpectAllFieldsAndExtensionsInOrder (serialized)
 
def ExpectAllFieldsSet (test_case, message)
 
def GoldenFile (filename)
 
def GoldenFileData (filename)
 
def IsProto2 (message)
 
def SetAllExtensions (message)
 
def SetAllFields (message)
 
def SetAllFieldsAndExtensions (message)
 
def SetAllNonLazyFields (message)
 
def SetAllPackedExtensions (message)
 
def SetAllPackedFields (message)
 
def SetAllUnpackedFields (message)
 

Variables

string __author__ = 'robinson@google.com (Will Robinson)'
 
 long = int
 

Function Documentation

◆ ExpectAllFieldsAndExtensionsInOrder()

def google.protobuf.internal.test_util.ExpectAllFieldsAndExtensionsInOrder (   serialized)
Ensures that serialized is the serialization we expect for a message
filled with SetAllFieldsAndExtensions().  (Specifically, ensures that the
serialization is in canonical, tag-number order).

Definition at line 378 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ ExpectAllFieldsSet()

def google.protobuf.internal.test_util.ExpectAllFieldsSet (   test_case,
  message 
)
Check all fields for correct values have after Set*Fields() is called.

Definition at line 408 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ GoldenFile()

def google.protobuf.internal.test_util.GoldenFile (   filename)
Finds the given golden file and returns a file object representing it.

Definition at line 617 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ GoldenFileData()

def google.protobuf.internal.test_util.GoldenFileData (   filename)
Finds the given golden file and returns its contents.

Definition at line 643 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ IsProto2()

def google.protobuf.internal.test_util.IsProto2 (   message)

◆ SetAllExtensions()

def google.protobuf.internal.test_util.SetAllExtensions (   message)
Sets every extension in the message to a unique value.

Args:
  message: A unittest_pb2.TestAllExtensions instance.

Definition at line 223 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ SetAllFields()

def google.protobuf.internal.test_util.SetAllFields (   message)

◆ SetAllFieldsAndExtensions()

def google.protobuf.internal.test_util.SetAllFieldsAndExtensions (   message)
Sets every field and extension in the message to a unique value.

Args:
  message: A unittest_pb2.TestAllExtensions message.

Definition at line 365 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ SetAllNonLazyFields()

def google.protobuf.internal.test_util.SetAllNonLazyFields (   message)
Sets every non-lazy field in the message to a unique value.

Args:
  message: A TestAllTypes instance.

Definition at line 59 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ SetAllPackedExtensions()

def google.protobuf.internal.test_util.SetAllPackedExtensions (   message)
Sets every extension in the message to a unique value.

Args:
  message: A unittest_pb2.TestPackedExtensions instance.

Definition at line 672 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ SetAllPackedFields()

def google.protobuf.internal.test_util.SetAllPackedFields (   message)
Sets every field in the message to a unique value.

Args:
  message: A TestPackedTypes instance.

Definition at line 649 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

◆ SetAllUnpackedFields()

def google.protobuf.internal.test_util.SetAllUnpackedFields (   message)
Sets every field in the message to a unique value.

Args:
  message: A unittest_pb2.TestUnpackedTypes instance.

Definition at line 698 of file bloaty/third_party/protobuf/python/google/protobuf/internal/test_util.py.

Variable Documentation

◆ __author__

string google.protobuf.internal.test_util.__author__ = 'robinson@google.com (Will Robinson)'
private

◆ long

google.protobuf.internal.test_util.long = int


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:27