ó Du—ac@sädZyddlmZWn!ek r=ddlmZnXyddlZWnek rmddlZnXddlmZddlm Z ddlm Z ddlm Z dej fd „ƒYZ ed kràejƒndS( s(Tests for google.protobuf.proto_builder.iÿÿÿÿ(t OrderedDictN(tdescriptor_pb2(tdescriptor_pool(t proto_builder(t text_formattProtoBuilderTestcBs,eZd„Zd„Zd„Zd„ZRS(cCsCtdtjjfdtjjfgƒ|_t|jƒ|_dS(Ntfootbar(RRtFieldDescriptorProtot TYPE_INT64t TYPE_STRINGtordered_fieldstdictt_fields(tself((sO/usr/lib/python2.7/site-packages/google/protobuf/internal/proto_builder_test.pytsetUp3scCsPtj|jddƒ}|ƒ}d|_d|_|jdtj|ƒƒdS(s&Test that we can create a proto class.t full_names0net.proto2.python.public.proto_builder_test.Testi90tasdfsbar: "asdf" foo: 12345 N(RtMakeSimpleProtoClassR RRtassertMultiLineEqualRtMessageToString(Rt proto_clstproto((sO/usr/lib/python2.7/site-packages/google/protobuf/internal/proto_builder_test.pyttestMakeSimpleProtoClass:s     cCsPtj|jddƒ}|ƒ}d|_d|_|jdtj|ƒƒdS(sBTest that the field order is maintained when given an OrderedDict.Rs7net.proto2.python.public.proto_builder_test.OrderedTesti90Rsfoo: 12345 bar: "asdf" N(RRR RRRRR(RRR((sO/usr/lib/python2.7/site-packages/google/protobuf/internal/proto_builder_test.pyttestOrderedFieldsEs     cCsbtjƒ}tj|jddd|ƒ}tj|jddd|ƒ}|j|j|jƒdS(s%Test that the DescriptorPool is used.Rs0net.proto2.python.public.proto_builder_test.TesttpoolN(RtDescriptorPoolRRR tassertIst DESCRIPTOR(RRt proto_cls1t proto_cls2((sO/usr/lib/python2.7/site-packages/google/protobuf/internal/proto_builder_test.pyttestMakeSameProtoClassTwicePs     (t__name__t __module__RRRR(((sO/usr/lib/python2.7/site-packages/google/protobuf/internal/proto_builder_test.pyR1s  t__main__(t__doc__t collectionsRt ImportErrort ordereddictt unittest2tunittesttgoogle.protobufRRRRtTestCaseRR tmain(((sO/usr/lib/python2.7/site-packages/google/protobuf/internal/proto_builder_test.pyt s  -