ó Du—ac@s¬dZyddlZWnek r5ddlZnXddlmZddlmZddlmZddlmZdej fd„ƒYZ e d kr¨ej ƒndS( s*Tests for google.protobuf.symbol_database.iÿÿÿÿN(t unittest_pb2(t descriptor(tdescriptor_pool(tsymbol_databasetSymbolDatabaseTestcBsYeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( cCsÆtjr$tjdtjƒƒ}n tjƒ}|jtjƒ|j tj ƒ|j tj j ƒ|j tj j ƒ|j tj j ƒ|jtjjƒ|jtj jjƒ|jtjƒ|S(Ntpool(Rt_USE_C_DESCRIPTORSRtSymbolDatabaseRtDefaulttRegisterFileDescriptorRt DESCRIPTORtRegisterMessaget TestAllTypest NestedMessaget OptionalGroupt RepeatedGrouptRegisterEnumDescriptort ForeignEnumt NestedEnumtRegisterServiceDescriptort _TESTSERVICE(tselftdb((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyt _Database/s  cCs5|jƒjtjjƒ}|j|tjkƒdS(N(Rt GetPrototypeRR R t assertTrue(Rtinstance((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestGetPrototypeAs cCs6|jƒjdgƒ}|jtj|dkƒdS(Nsgoogle/protobuf/unittest.protosprotobuf_unittest.TestAllTypes(Rt GetMessagesRRR (Rtmessages((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestGetMessagesFs   cCs•|jtj|jƒjdƒƒ|jtjj|jƒjdƒƒ|jtjj|jƒjdƒƒ|jtjj|jƒjdƒƒdS(Nsprotobuf_unittest.TestAllTypess,protobuf_unittest.TestAllTypes.NestedMessages,protobuf_unittest.TestAllTypes.OptionalGroups,protobuf_unittest.TestAllTypes.RepeatedGroup(t assertEqualRR Rt GetSymbolR RR(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyt testGetSymbolMs   cCsN|jd|jƒjjdƒjƒ|jd|jƒjjdƒjƒdS(Nsprotobuf_unittest.ForeignEnums)protobuf_unittest.TestAllTypes.NestedEnum(RRRtFindEnumTypeByNamet full_name(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyt testEnums[s cCsN|jd|jƒjjdƒjƒ|jd|jƒjjdƒjƒdS(Nsprotobuf_unittest.TestAllTypess,protobuf_unittest.TestAllTypes.NestedMessage(RRRtFindMessageTypeByNameR#(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestFindMessageTypeByNamefs cCs)|jd|jƒjjdƒjƒdS(Nsprotobuf_unittest.TestService(RRRtFindServiceByNameR#(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestFindServiceByNamepscCsN|jd|jƒjjdƒjƒ|jd|jƒjjdƒjƒdS(Nsgoogle/protobuf/unittest.protos)protobuf_unittest.TestAllTypes.NestedEnumsprotobuf_unittest.TestAllTypes(RRRtFindFileContainingSymboltname(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestFindFileContainingSymbolvs cCs)|jd|jƒjjdƒjƒdS(Nsgoogle/protobuf/unittest.proto(RRRtFindFileByNameR*(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestFindFileByNames( t__name__t __module__RRRR!R$R&R(R+R-(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyR-s      t__main__( t__doc__t unittest2tunittestt ImportErrortgoogle.protobufRRRRtTestCaseRR.tmain(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyt s [