Implemented DescriptorPool methods.

pull/13171/head
Joshua Haberman 3 years ago
parent b58824152e
commit 55e5da5489
  1. 272
      python/descriptor_pool.c
  2. 1
      python/pb_unit_tests/descriptor_pool_test_wrapper.py
  3. 2
      python/pb_unit_tests/descriptor_test_wrapper.py
  4. 3
      python/pb_unit_tests/generator_test_wrapper.py
  5. 5
      python/pb_unit_tests/json_format_test_wrapper.py
  6. 2
      python/pb_unit_tests/keywords_test_wrapper.py
  7. 3
      python/pb_unit_tests/proto_builder_test_wrapper.py
  8. 3
      python/pb_unit_tests/reflection_test_wrapper.py
  9. 13
      python/pb_unit_tests/text_format_test_wrapper.py

@ -28,6 +28,7 @@
#include "python/descriptor_pool.h"
#include "python/descriptor.h"
#include "python/message.h"
#include "python/protobuf.h"
#include "upb/def.h"
@ -39,6 +40,7 @@ typedef struct {
PyObject_HEAD
upb_symtab* symtab;
PyObject* db;
PyObject* serialized_pb_dict;
} PyUpb_DescriptorPool;
PyObject* PyUpb_DescriptorPool_GetDefaultPool() {
@ -46,12 +48,12 @@ PyObject* PyUpb_DescriptorPool_GetDefaultPool() {
return s->default_pool;
}
static PyObject* PyUpb_DescriptorPool_DoCreateWithCache(PyTypeObject* type,
PyObject* db,
PyUpb_WeakMap *obj_cache) {
static PyObject* PyUpb_DescriptorPool_DoCreateWithCache(
PyTypeObject* type, PyObject* db, PyUpb_WeakMap* obj_cache) {
PyUpb_DescriptorPool* pool = (void*)PyType_GenericAlloc(type, 0);
pool->symtab = upb_symtab_new();
pool->db = db;
pool->serialized_pb_dict = PyDict_New();
Py_XINCREF(pool->db);
PyUpb_WeakMap_Add(obj_cache, pool->symtab, &pool->ob_base);
return &pool->ob_base;
@ -85,12 +87,19 @@ PyObject* PyUpb_DescriptorPool_Get(const upb_symtab* symtab) {
}
static void PyUpb_DescriptorPool_Dealloc(PyUpb_DescriptorPool* self) {
upb_symtab_free(self->symtab);
PyUpb_DescriptorPool_Clear(self);
Py_DECREF(self->serialized_pb_dict);
upb_symtab_free(self->symtab);
PyUpb_ObjCache_Delete(self->symtab);
PyUpb_Dealloc(self);
}
PyObject* PyUpb_DescriptorPool_GetSerializedPb(PyObject* _self,
const char* filename) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
return PyDict_GetItemString(self->serialized_pb_dict, filename);
}
/*
* DescriptorPool.__new__()
*
@ -106,6 +115,7 @@ static PyObject* PyUpb_DescriptorPool_New(PyTypeObject* type, PyObject* args,
return NULL;
}
if (db == Py_None) db = NULL;
return PyUpb_DescriptorPool_DoCreate(type, db);
}
@ -156,6 +166,9 @@ static PyObject* PyUpb_DescriptorPool_AddSerializedFile(
goto done;
}
PyDict_SetItemString(self->serialized_pb_dict, upb_filedef_name(filedef),
serialized_pb);
result = PyUpb_FileDescriptor_Get(filedef);
done:
@ -163,6 +176,40 @@ done:
return result;
}
static PyObject* PyUpb_DescriptorPool_Add(PyObject* _self,
PyObject* file_desc) {
PyObject* subargs = PyTuple_New(0);
// TODO: check file_desc type more.
PyObject* serialized =
PyUpb_CMessage_SerializeToString(file_desc, subargs, NULL);
Py_DECREF(subargs);
if (!serialized) return NULL;
PyObject* ret = PyUpb_DescriptorPool_AddSerializedFile(_self, serialized);
Py_DECREF(serialized);
return ret;
}
/*
* PyUpb_DescriptorPool_FindFileByName()
*
* Implements:
* DescriptorPool.FindFileByName(self, name)
*/
static PyObject* PyUpb_DescriptorPool_FindFileByName(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const upb_filedef* file = upb_symtab_lookupfile(self->symtab, name);
if (file == NULL) {
return PyErr_Format(PyExc_KeyError, "Couldn't find file %.200s", name);
}
return PyUpb_FileDescriptor_Get(file);
}
/*
* PyUpb_DescriptorPool_FindExtensionByName()
*
@ -184,40 +231,195 @@ static PyObject* PyUpb_DescriptorPool_FindExtensionByName(PyObject* _self,
return PyUpb_FieldDescriptor_Get(field);
}
/*
* PyUpb_DescriptorPool_FindMessageTypeByName()
*
* Implements:
* DescriptorPool.FindMessageTypeByName(self, name)
*/
static PyObject* PyUpb_DescriptorPool_FindMessageTypeByName(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const upb_msgdef* m = upb_symtab_lookupmsg(self->symtab, name);
if (m == NULL) {
return PyErr_Format(PyExc_KeyError, "Couldn't find message %.200s", name);
}
return PyUpb_Descriptor_Get(m);
}
/*
* PyUpb_DescriptorPool_FindFieldByName()
*
* Implements:
* DescriptorPool.FindFieldByName(self, name)
*/
static PyObject* PyUpb_DescriptorPool_FindFieldByName(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const upb_fielddef* f = upb_symtab_lookupext(self->symtab, name);
if (!f) {
const char* last_dot = strrchr(name, '.');
if (last_dot) {
const upb_msgdef* parent =
upb_symtab_lookupmsg2(self->symtab, name, last_dot - name);
if (parent) {
f = upb_msgdef_ntofz(parent, last_dot + 1);
}
}
}
if (!f) {
return PyErr_Format(PyExc_KeyError, "Couldn't find message %.200s", name);
}
return PyUpb_FieldDescriptor_Get(f);
}
/*
* PyUpb_DescriptorPool_FindEnumTypeByName()
*
* Implements:
* DescriptorPool.FindEnumTypeByName(self, name)
*/
static PyObject* PyUpb_DescriptorPool_FindEnumTypeByName(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const upb_enumdef* e = upb_symtab_lookupenum(self->symtab, name);
if (e == NULL) {
return PyErr_Format(PyExc_KeyError, "Couldn't find enum %.200s", name);
}
return PyUpb_EnumDescriptor_Get(e);
}
/*
* PyUpb_DescriptorPool_FindOneofByName()
*
* Implements:
* DescriptorPool.FindOneofByName(self, name)
*/
static PyObject* PyUpb_DescriptorPool_FindOneofByName(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const char* last_dot = strrchr(name, '.');
if (last_dot) {
const upb_msgdef* parent =
upb_symtab_lookupmsg2(self->symtab, name, last_dot - name);
if (parent) {
const upb_oneofdef* o = upb_msgdef_ntooz(parent, last_dot + 1);
return PyUpb_OneofDescriptor_Get(o);
}
}
return PyErr_Format(PyExc_KeyError, "Couldn't find enum %.200s", name);
}
static PyObject* PyUpb_DescriptorPool_FindServiceByName(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const upb_servicedef* s = upb_symtab_lookupservice(self->symtab, name);
if (s == NULL) {
return PyErr_Format(PyExc_KeyError, "Couldn't find enum %.200s", name);
}
return PyUpb_ServiceDescriptor_Get(s);
}
static PyObject* PyUpb_DescriptorPool_FindFileContainingSymbol(PyObject* _self,
PyObject* arg) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const char* name = PyUpb_GetStrData(arg);
if (!name) return NULL;
const upb_filedef* f = upb_symtab_lookupfileforsym(self->symtab, name);
if (f == NULL) {
return PyErr_Format(PyExc_KeyError, "Couldn't find symbol %.200s", name);
}
return PyUpb_FileDescriptor_Get(f);
}
static PyObject* PyUpb_DescriptorPool_FindExtensionByNumber(PyObject* _self,
PyObject* args) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
PyObject* message_descriptor;
int number;
if (!PyArg_ParseTuple(args, "Oi", &message_descriptor, &number)) {
return NULL;
}
const upb_fielddef* f = upb_symtab_lookupextbynum(
self->symtab, PyUpb_Descriptor_GetDef(message_descriptor), number);
if (f == NULL) {
return PyErr_Format(PyExc_KeyError, "Couldn't find Extension %d", number);
}
return PyUpb_FieldDescriptor_Get(f);
}
static PyObject* PyUpb_DescriptorPool_FindAllExtensions(PyObject* _self,
PyObject* msg_desc) {
PyUpb_DescriptorPool* self = (PyUpb_DescriptorPool*)_self;
const upb_msgdef* m = PyUpb_Descriptor_GetDef(msg_desc);
size_t n;
const upb_fielddef** ext = upb_symtab_getallexts(self->symtab, m, &n);
PyObject* ret = PyList_New(n);
for (size_t i = 0; i < n; i++) {
PyObject* field = PyUpb_FieldDescriptor_Get(ext[i]);
PyList_SetItem(ret, i, field);
}
return ret;
}
static PyMethodDef PyUpb_DescriptorPool_Methods[] = {
/*
TODO: implement remaining methods.
{ "Add", Add, METH_O,
"Adds the FileDescriptorProto and its types to this pool." },
*/
{"Add", PyUpb_DescriptorPool_Add, METH_O,
"Adds the FileDescriptorProto and its types to this pool."},
{"AddSerializedFile", PyUpb_DescriptorPool_AddSerializedFile, METH_O,
"Adds a serialized FileDescriptorProto to this pool."},
/*
{ "FindFileByName", FindFileByName, METH_O,
"Searches for a file descriptor by its .proto name." },
{ "FindMessageTypeByName", FindMessageByName, METH_O,
"Searches for a message descriptor by full name." },
{ "FindFieldByName", FindFieldByNameMethod, METH_O,
"Searches for a field descriptor by full name." },
*/
{"FindFileByName", PyUpb_DescriptorPool_FindFileByName, METH_O,
"Searches for a file descriptor by its .proto name."},
{"FindMessageTypeByName", PyUpb_DescriptorPool_FindMessageTypeByName,
METH_O, "Searches for a message descriptor by full name."},
{"FindFieldByName", PyUpb_DescriptorPool_FindFieldByName, METH_O,
"Searches for a field descriptor by full name."},
{"FindExtensionByName", PyUpb_DescriptorPool_FindExtensionByName, METH_O,
"Searches for extension descriptor by full name."},
/*
{ "FindEnumTypeByName", FindEnumTypeByNameMethod, METH_O,
"Searches for enum type descriptor by full name." },
{ "FindOneofByName", FindOneofByNameMethod, METH_O,
"Searches for oneof descriptor by full name." },
{ "FindServiceByName", FindServiceByName, METH_O,
"Searches for service descriptor by full name." },
{ "FindMethodByName", FindMethodByName, METH_O,
"Searches for method descriptor by full name." },
{ "FindFileContainingSymbol", FindFileContainingSymbol, METH_O,
"Gets the FileDescriptor containing the specified symbol." },
{ "FindExtensionByNumber", FindExtensionByNumber, METH_VARARGS,
"Gets the extension descriptor for the given number." },
{ "FindAllExtensions", FindAllExtensions, METH_O,
"Gets all known extensions of the given message descriptor." },
*/
{"FindEnumTypeByName", PyUpb_DescriptorPool_FindEnumTypeByName, METH_O,
"Searches for enum type descriptor by full name."},
{"FindOneofByName", PyUpb_DescriptorPool_FindOneofByName, METH_O,
"Searches for oneof descriptor by full name."},
{"FindServiceByName", PyUpb_DescriptorPool_FindServiceByName, METH_O,
"Searches for service descriptor by full name."},
//{ "Find, PyUpb_DescriptorPool_Find, METH_O,
// "Searches for method descriptor by full name." },
{"FindFileContainingSymbol", PyUpb_DescriptorPool_FindFileContainingSymbol,
METH_O, "Gets the FileDescriptor containing the specified symbol."},
{"FindExtensionByNumber", PyUpb_DescriptorPool_FindExtensionByNumber,
METH_VARARGS, "Gets the extension descriptor for the given number."},
{"FindAllExtensions", PyUpb_DescriptorPool_FindAllExtensions, METH_O,
"Gets all known extensions of the given message descriptor."},
{NULL}};
static PyType_Slot PyUpb_DescriptorPool_Slots[] = {
@ -241,9 +443,9 @@ static PyType_Spec PyUpb_DescriptorPool_Spec = {
// -----------------------------------------------------------------------------
bool PyUpb_InitDescriptorPool(PyObject* m) {
PyUpb_ModuleState *state = PyUpb_ModuleState_GetFromModule(m);
PyUpb_ModuleState* state = PyUpb_ModuleState_GetFromModule(m);
PyTypeObject* descriptor_pool_type =
AddObject(m, "DescriptorPool", &PyUpb_DescriptorPool_Spec);
PyUpb_AddClass(m, &PyUpb_DescriptorPool_Spec);
if (!descriptor_pool_type) return false;

@ -29,7 +29,6 @@ import unittest
print(unittest)
descriptor_pool_test.AddDescriptorTest.testAddTypeError.__unittest_expecting_failure__ = True
descriptor_pool_test.AddDescriptorTest.testCustomDescriptorPool.__unittest_expecting_failure__ = True
descriptor_pool_test.AddDescriptorTest.testEmptyDescriptorPool.__unittest_expecting_failure__ = True
descriptor_pool_test.AddDescriptorTest.testEnum.__unittest_expecting_failure__ = True
descriptor_pool_test.AddDescriptorTest.testFile.__unittest_expecting_failure__ = True

@ -40,9 +40,7 @@ descriptor_test.DescriptorCopyToProtoTest.testCopyToProto_TypeError.__unittest_e
descriptor_test.GeneratedDescriptorTest.testDescriptor.__unittest_expecting_failure__ = True
descriptor_test.MakeDescriptorTest.testCamelcaseName.__unittest_expecting_failure__ = True
descriptor_test.MakeDescriptorTest.testJsonName.__unittest_expecting_failure__ = True
descriptor_test.MakeDescriptorTest.testMakeDescriptorWithNestedFields.__unittest_expecting_failure__ = True
descriptor_test.MakeDescriptorTest.testMakeDescriptorWithOptions.__unittest_expecting_failure__ = True
descriptor_test.MakeDescriptorTest.testMakeDescriptorWithUnsignedIntField.__unittest_expecting_failure__ = True
# We must skip these tests entirely (rather than running them with
# __unittest_expecting_failure__) because they error out in setUp():

@ -32,9 +32,6 @@ generator_test.GeneratorTest.testFileDescriptor.__unittest_expecting_failure__ =
generator_test.GeneratorTest.testMessageWithCustomOptions.__unittest_expecting_failure__ = True
generator_test.GeneratorTest.testOneof.__unittest_expecting_failure__ = True
generator_test.GeneratorTest.testOptions.__unittest_expecting_failure__ = True
generator_test.SymbolDatabaseRegistrationTest.testEnums.__unittest_expecting_failure__ = True
generator_test.SymbolDatabaseRegistrationTest.testFindFileByName.__unittest_expecting_failure__ = True
generator_test.SymbolDatabaseRegistrationTest.testGetSymbol.__unittest_expecting_failure__ = True
if __name__ == '__main__':
unittest.main(module=generator_test, verbosity=2)

@ -29,7 +29,6 @@ import unittest
json_format_test.JsonFormatTest.testAllFieldsToJson.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testAlwaysSeriliaze.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testAnyMessage.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testAnyMessageDescriptorPoolMissingType.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testDurationMessage.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testEmptyMessageToJson.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testExtensionSerializationDictMatchesProto3Spec.__unittest_expecting_failure__ = True
@ -40,17 +39,13 @@ json_format_test.JsonFormatTest.testExtensionToDictAndBackWithScalar.__unittest_
json_format_test.JsonFormatTest.testExtensionToJsonAndBack.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testFieldMaskMessage.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testFloatPrecision.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testIgnoreUnknownField.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testInvalidAny.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testInvalidMap.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testJsonEscapeString.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testJsonName.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testJsonParseDictToAnyDoesNotAlterInput.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testListValueMessage.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testMapFields.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testNullValue.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testOneofFields.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testParseDictAnyDescriptorPoolMissingType.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testParseNull.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testPartialMessageToJson.__unittest_expecting_failure__ = True
json_format_test.JsonFormatTest.testStructMessage.__unittest_expecting_failure__ = True

@ -28,8 +28,6 @@ import unittest
keywords_test.KeywordsConflictTest.testExtension.__unittest_expecting_failure__ = True
keywords_test.KeywordsConflictTest.testExtensionForNestedMessage.__unittest_expecting_failure__ = True
keywords_test.KeywordsConflictTest.testMessage.__unittest_expecting_failure__ = True
keywords_test.KeywordsConflictTest.testNestedMessage.__unittest_expecting_failure__ = True
if __name__ == '__main__':
unittest.main(module=keywords_test, verbosity=2)

@ -27,9 +27,6 @@ from google.protobuf.internal import proto_builder_test
import unittest
proto_builder_test.ProtoBuilderTest.testMakeLargeProtoClass.__unittest_expecting_failure__ = True
proto_builder_test.ProtoBuilderTest.testMakeSameProtoClassTwice.__unittest_expecting_failure__ = True
proto_builder_test.ProtoBuilderTest.testMakeSimpleProtoClass.__unittest_expecting_failure__ = True
proto_builder_test.ProtoBuilderTest.testOrderedFields.__unittest_expecting_failure__ = True
if __name__ == '__main__':
unittest.main(module=proto_builder_test, verbosity=2)

@ -35,8 +35,6 @@ reflection_test.ByteSizeTest.testPackedExtensions.__unittest_expecting_failure__
reflection_test.ByteSizeTest.testRepeatedCompositesDelete.__unittest_expecting_failure__ = True
reflection_test.ByteSizeTest.testRepeatedScalarsRemove.__unittest_expecting_failure__ = True
reflection_test.ClassAPITest.testMakeClassWithNestedDescriptor.__unittest_expecting_failure__ = True
reflection_test.ClassAPITest.testParsingFlatClass.__unittest_expecting_failure__ = True
reflection_test.ClassAPITest.testParsingNestedClass.__unittest_expecting_failure__ = True
reflection_test.ExtensionEqualityTest.testExtensionEquality.__unittest_expecting_failure__ = True
reflection_test.MutualRecursionEqualityTest.testEqualityWithMutualRecursion.__unittest_expecting_failure__ = True
reflection_test.OptionsTest.testMessageOptions.__unittest_expecting_failure__ = True
@ -54,7 +52,6 @@ reflection_test.Proto2ReflectionTest.testMergeFromExtensionsNestedMessage.__unit
reflection_test.Proto2ReflectionTest.testMergeFromExtensionsRepeated.__unittest_expecting_failure__ = True
reflection_test.Proto2ReflectionTest.testMergeFromExtensionsSingular.__unittest_expecting_failure__ = True
reflection_test.Proto2ReflectionTest.testNestedExtensions.__unittest_expecting_failure__ = True
reflection_test.Proto2ReflectionTest.testRegisteredExtensions.__unittest_expecting_failure__ = True
reflection_test.Proto2ReflectionTest.testRepeatedCompositeConstructor.__unittest_expecting_failure__ = True
reflection_test.Proto2ReflectionTest.testRepeatedCompositeRemove.__unittest_expecting_failure__ = True
reflection_test.Proto2ReflectionTest.testRepeatedCompositeReverse_Empty.__unittest_expecting_failure__ = True

@ -40,7 +40,6 @@ text_format_test.OnlyWorksWithProto2RightNowTests.testPrintInIndexOrder.__unitte
text_format_test.OnlyWorksWithProto2RightNowTests.testPrintMap.__unittest_expecting_failure__ = True
text_format_test.OnlyWorksWithProto2RightNowTests.testPrintMapUsingCppImplementation.__unittest_expecting_failure__ = True
text_format_test.OnlyWorksWithProto2RightNowTests.testPrintUnknownFields.__unittest_expecting_failure__ = True
text_format_test.OptionalColonMessageToStringTest.testForcePrintOptionalColon.__unittest_expecting_failure__ = True
text_format_test.Proto2Tests.testExtensionInsideAnyMessage.__unittest_expecting_failure__ = True
text_format_test.Proto2Tests.testMergeDuplicateExtensionScalars.__unittest_expecting_failure__ = True
text_format_test.Proto2Tests.testParseAllExtensions.__unittest_expecting_failure__ = True
@ -57,19 +56,7 @@ text_format_test.Proto2Tests.testPrintAllExtensionsPointy.__unittest_expecting_f
text_format_test.Proto2Tests.testPrintMessageSet.__unittest_expecting_failure__ = True
text_format_test.Proto2Tests.testPrintMessageSetAsOneLine.__unittest_expecting_failure__ = True
text_format_test.Proto2Tests.testPrintMessageSetByFieldNumber.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testMergeAlternativeUrl.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testMergeExpandedAny.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testMergeExpandedAnyDescriptorPoolMissingType.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testMergeExpandedAnyPointyBrackets.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testMergeExpandedAnyRepeated.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testMergeMissingAnyEndToken.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintAndParseMessageInvalidAny.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintMessageExpandAny.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintMessageExpandAnyAsOneLine.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintMessageExpandAnyAsOneLinePointyBrackets.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintMessageExpandAnyDescriptorPoolMissingType.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintMessageExpandAnyPointyBrackets.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testPrintMessageExpandAnyRepeated.__unittest_expecting_failure__ = True
text_format_test.Proto3Tests.testTopAnyMessage.__unittest_expecting_failure__ = True
getattr(text_format_test.TextFormatMessageToStringTests, "testCustomOptions" + sep + "0").__unittest_expecting_failure__ = True
getattr(text_format_test.TextFormatMessageToStringTests, "testCustomOptions" + sep + "1").__unittest_expecting_failure__ = True

Loading…
Cancel
Save