SLjc@sdZyddlZWnek r5ddlZnXddlmZddlmZddlmZddlmZdej fdYZ e d krej ndS( s*Tests for google.protobuf.symbol_database.iN(t unittest_pb2(t descriptor(tdescriptor_pool(tsymbol_databasetSymbolDatabaseTestcBsYeZdZdZdZdZdZdZdZdZ dZ RS( cCstjr$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|jjtjj}|j|tjkdS(N(Rt GetPrototypeRR R t assertTrue(Rtinstance((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestGetPrototypeAs cCs6|jjdg}|jtj|dkdS(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|jjd|jtjj|jjd|jtjj|jjd|jtjj|jjddS(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|jjjdj|jd|jjjdjdS(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|jjjdj|jd|jjjdjdS(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|jjjdjdS(Nsprotobuf_unittest.TestService(RRRtFindServiceByNameR#(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/symbol_database_test.pyttestFindServiceByNamepscCsN|jd|jjjdj|jd|jjjdjdS(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|jjjdjdS(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 [