Hacked By AnonymousFox

Current Path : /usr/lib/python2.7/site-packages/google/protobuf/internal/
Upload File :
Current File : //usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyo

�
Du�ac@s!dZdZddlZddlZyddlZWnek
rSddlZnXddlmZddlm	Z	ddlm
Z
ddlmZddlm
Z
dd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZdefd��YZdeejfd��YZdeejfd��YZdeejfd��YZdefd��YZdefd��YZ d efd!��YZ!d"efd#��YZ"d$efd%��YZ#d&efd'��YZ$d(efd)��YZ%d*ejfd+��YZ&ed,d-ie!ie d.d/fd0d1fg�d26e!ie d3d4fd5d6fg�d26e!ie d7d8fd9d:fg�d26d;e"d/d2d7�fd<e$d1d=�fg�d>6d;e"d/d2d5�fd<e$d1d?�fd@e#dAd>�fg�dB6d;e"d/d2d0�fdCe#d1dB�fgdDe'�dE6e!ie dFdAfdGdHfg�d26e!ie dIdJfdKdLfg�d26e!ie dMdNfdOdPfg�d26d;e"d/d2dO�fd<e$d1dQ�fg�d>6d;e"d/d2dI�fd<e$d1dR�fd@e#dAd>�fg�dB6d;e"d/d2dF�fdCe#d1dB�fg�dS6�Z(edTd-ie!ie dUdVfdWdXfg�d26e!ie dYdZfd[d\fg�d26e!ie d]d^fd_d`fg�d26d;e"d/d2d]�fd<e$d1da�fg�d>6d;e"d/d2d[�fd<e$d1db�fd@e#dAd>�fg�dB6d;e"d/d2dW�fdCe#d1dB�fgdcdde%dedE�fg�df6dgd,dhgdidhg�Z)e*djkrej+�ndS(ks*Tests for google.protobuf.descriptor_pool.s"matthewtoia@google.com (Matt Toia)i����N(tunittest_import_pb2(tunittest_import_public_pb2(tunittest_pb2(tdescriptor_pb2(tapi_implementation(tdescriptor_pool_test1_pb2(tdescriptor_pool_test2_pb2(tfactory_test1_pb2(tfactory_test2_pb2(tfile_options_test_pb2(tmore_messages_pb2(t
descriptor(tdescriptor_database(tdescriptor_pool(tmessage_factory(tsymbol_databasetDescriptorPoolTestBasecBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs�d}|jj|�}|j|tj�|j||j�|jd|j�|jd|j	�d}|jj|�}|j|tj�|j||j�|jd|j�|jd|j	�dS(Ns,google/protobuf/internal/factory_test1.protosgoogle.protobuf.python.internaltFactory1Messages,google/protobuf/internal/factory_test2.prototFactory2Message(
tpooltFindFileByNametassertIsInstanceRtFileDescriptortassertEqualtnametpackagetassertIntmessage_types_by_name(tselftname1t
file_desc1tname2t
file_desc2((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindFileByNameAscCs*|jt��|jjd�WdQXdS(NsDoes not exist(tassertRaisestKeyErrorRR(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindFileByNameFailurePscCsh|jjd�}|j|tj�|jd|j�|jd|j�|jd|j	�|jjd�}|j|tj�|jd|j�|jd|j�|jd|j	�|jjd�}|j|tj�|jd|j�|jjd	�}|j|tj�|jd|j�|jjd
�}|j|tj�|jd|j�dS(Ns/google.protobuf.python.internal.Factory1Messages,google/protobuf/internal/factory_test1.protosgoogle.protobuf.python.internalRs/google.protobuf.python.internal.Factory2Messages,google/protobuf/internal/factory_test2.protoRs-google.protobuf.python.internal.another_fields>google.protobuf.python.internal.Factory2Message.one_more_fieldsprotobuf_unittest.TestServicesgoogle/protobuf/unittest.proto(
RtFindFileContainingSymbolRRRRRRRR(RRR t
file_desc3t
file_desc4t
file_desc5((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindFileContainingSymbolTs:			
			
			
			
			cCs*|jt��|jjd�WdQXdS(NsDoes not exist(R"R#RR%(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt#testFindFileContainingSymbolFailureysc	Cs�|jjd�}|j|tj�|jd|j�|jd|j�|jd|j	�|j
|j�|jd}|jd|j�|j||j	�|j
d}|jd|j�|j||j	�|j||jdj�|j||jdj�|jjd�}|j|tj�|jd	|j�|jd|j�|j|j	�|jd}|jd
|j�|j||j	�|j
d}|jd|j�|j||j	�|j||jdj�|j||jd
j�|j|jdj�|jd|jdj�|j|jdj�|jd|jdj�|j|jdj�|jd|jdj�|j|jdj�|j
|jdj�|j|jdj�|jd|jdj�|jjd�}|j||�|j|jdj�|jd|jdj�|jdt|j��|jdt|j��|jdt|jdj��xVddgD]H}|j|jd|j|j�|j|j||jdj�q�WdS(Ns/google.protobuf.python.internal.Factory1MessageRitNestedFactory1MessagetNestedFactory1Enumtnested_factory_1_messagetnested_factory_1_enums/google.protobuf.python.internal.Factory2MessageRtNestedFactory2MessagetNestedFactory2Enumtnested_factory_2_messagetnested_factory_2_enumtint_with_defaulti�tdouble_with_defaultg{�G�#@tstring_with_defaultshello worldtbool_with_defaulttenum_with_defaultisEgoogle.protobuf.python.internal.Factory2Message.NestedFactory2Messagetbytes_with_defaultsa�cit	oneof_inttoneof_string(RtFindMessageTypeByNameRRt
DescriptorRRt	full_nametNonetcontaining_typetassertFalsethas_optionstnested_typest
enum_typestfields_by_nametmessage_typet	enum_typetassertIsNonet
assertTruethas_default_valuet
default_valuetlentoneofstoneofs_by_nametfieldstcontaining_oneofR(	Rtmsg1tnested_msg1tnested_enum1tmsg2tnested_msg2tnested_enum2tmsg3R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindMessageTypeByName}s�			


			


		 cCsS|jt|jjd�tj�dkrf|jt|jjd�|jt|jjd�t}nt}|j||jj	d�|j||jj
d�|j||jjd�|j||jjd�|j||jj
d�|j||jjd�|j||jjd�tj�dkr6t}n|j||jjd�dS(Nttcppitpython(R"t	TypeErrorRtFindExtensionByNumberRtTypetFindMethodByNameR#tAttributeErrorR;tFindFieldByNametFindExtensionByNametFindEnumTypeByNametFindOneofByNametFindServiceByNameR%R(Rt
error_type((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindTypeErrors�s 		cCs*|jt��|jjd�WdQXdS(NsDoes not exist(R"R#RR;(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt testFindMessageTypeByNameFailure�scCsx|jjd�}|j|tj�|jd|jdj�|jd|jdj�|j|j	�|jjd�}|j|tj�|jd|jdj�|jd|jdj�|jjd	�}|j|tj�|jd|jd
j�|jd|jdj�|jjd�}|j|tj�|jd|jd
j�|jd|jdj�dS(Ns,google.protobuf.python.internal.Factory1EnumitFACTORY_1_VALUE_0itFACTORY_1_VALUE_1sBgoogle.protobuf.python.internal.Factory1Message.NestedFactory1EnumtNESTED_FACTORY_1_VALUE_0tNESTED_FACTORY_1_VALUE_1s,google.protobuf.python.internal.Factory2EnumtFACTORY_2_VALUE_0tFACTORY_2_VALUE_1sBgoogle.protobuf.python.internal.Factory2Message.NestedFactory2EnumtNESTED_FACTORY_2_VALUE_0tNESTED_FACTORY_2_VALUE_1(
RRbRRtEnumDescriptorRtvalues_by_nametnumberR@RA(Rtenum1RRtenum2RU((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindEnumTypeByName�s2								cCs*|jt��|jjd�WdQXdS(NsDoes not exist(R"R#RRb(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindEnumTypeByNameFailurescCs�t|t�r(tj�dkr(dSn|jjd�}|j|jd�|j|j|j	�|j
|j�|jt
��|jjd�WdQXdS(NRYs:google.protobuf.python.internal.Factory1Message.list_valuet
list_valuesDoes not exist(t
isinstancet#SecondaryDescriptorFromDescriptorDBRR]RR`RRtlabeltLABEL_REPEATEDR@RAR"R#(Rtfield((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindFieldByName
s		cCswt|t�r(tj�dkr(dSn|jjd�}|j|jd�|jt	��|jjd�WdQXdS(NRYs;google.protobuf.python.internal.Factory2Message.oneof_fieldtoneof_fieldsDoes not exist(
RxRyRR]RRcRRR"R#(Rtoneof((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindOneofByNames		cCs�t|t�r(tj�dkr(dSn|jjd�}|j|jd�|jjd�}|j|jd�|j|jd�|j	t
��|jjd�WdQXdS(NRYs>google.protobuf.python.internal.Factory2Message.one_more_fieldtone_more_fields-google.protobuf.python.internal.another_fieldt
another_fieldi�sDoes not exist(RxRyRR]RRaRRRrR"R#R`(Rt	extension((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindExtensionByName%s				cCs�|jjd�}|jjd�}|jd}|jj|�|jjd�}|jd}|jj|�|jj|�}t||g�}|j|t|��|jd�|jj|�}|j|t|��dS(Ns/google.protobuf.python.internal.Factory1Messages/google.protobuf.python.internal.Factory2MessageR�s,google/protobuf/internal/factory_test2.protoR�tunexpected_element(	RR;textensions_by_nametAddExtensionDescriptorRtFindAllExtensionstsetRtappend(Rtfactory1_messagetfactory2_messageR�t
factory_test2R�t
extensionstexpected_extension_numbers((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindAllExtensions7s 				
		

cCs�|jjd�}|jjd�}|jd}|jj|�|jjd�}|jd}|jj|�|jj|d�}|j|jd�|jj|d�}|j|jd�|jt	��|jj|d�}WdQXdS(	Ns/google.protobuf.python.internal.Factory1Messages/google.protobuf.python.internal.Factory2MessageR�s,google/protobuf/internal/factory_test2.protoR�i�i�i��(
RR;R�R�RR\RRR"R#(RR�R�R�R�R�R�((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindExtensionByNumberOs 				
		
cCsv|jt��|jjd�WdQX|jt��|jjd�WdQX|jt��|jjd�WdQXdS(Ns-google.protobuf.python.internal.another_fields>google.protobuf.python.internal.Factory2Message.one_more_fields:google.protobuf.python.internal.Factory1Message.list_value(R"R#RR`Ra(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestExtensionsAreNotFieldsfs	
	cCsO|jjd�}|j|jd�|jt��|jjd�WdQXdS(Nsprotobuf_unittest.TestServicesDoes not exist(RRdRR=R"R#(Rtservice((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindServicepscCsLtj�}tj|�|_|j|j�|j|j�|j�dS(N(	RtDescriptorDatabaseR
tDescriptorPoolRtAddtfactory_test1_fdtfactory_test2_fdRW(Rtdb((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestUserDefinedDBvs
cCswt|t�r(tj�dkr(dSntj�|_|jj|jj	��|jj|j
j	��|j�dS(NRY(RxRyRR]R
R�RtAddSerializedFileR�tSerializeToStringR�RW(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestAddSerializedFile}scs��fd�}|tj�tj�jjd�}�j|tj�||�t�t�ryt	j
�dkrydSntjj
tjj�}�jj|��jjd�}||�dS(s:Test the default value of enums which don't start at zero.cs1|jdjdj}�j|tjj�dS(NtDescriptorPoolTest1tnested_enum(RRDRJRRR�tBETA(tfile_descriptorRJ(R(sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt_CheckDefaultValue�s

	s4google/protobuf/internal/descriptor_pool_test1.protoRYN(Rt
DESCRIPTORRtDefaultRRtassertIsRxRyRR]RtFileDescriptorProtot
FromStringt
serialized_pbR�(RR�R�tdescriptor_proto((RsQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestEnumDefaultValue�s
	
			cs��fd���fd�}|tj��tj�}|jtjjtj	j
��|jtjjtj	j
��|jtjjtj	j
��tj
|�j|jtjj	j��}||��dS(s0Check the value returned by non-existent fields.cs$�j||��j||�dS(N(RR(tvaluetexpected_valuet
expected_type(R(sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt_CheckValueAndType�scs�y
t}Wntk
r#t}nXy
t}Wntk
rGt}nX�|jdt��|jd|tf��|jdttf��|j	dttf��|j
tt��|j
d|��|jdt��|j|jt�dS(NiuRX(tlongt	NameErrortinttunicodetstrtoptional_int32toptional_uint64toptional_floattfloattoptional_doublet
optional_booltFalsetbooltoptional_stringtoptional_bytestbytestoptional_nested_enumtFOO(tmsgtint64tunicode_type(R�(sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt_CheckDefaultValues�s 





N(RtTestAllTypesR
R�R�RR�R�RR�R�RRtMessageFactorytGetPrototypeR;R=(RR�Rt
message_class((R�RsQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt!testDefaultValueForCustomMessages�scCsdt|t�r(tj�dkr(dSntjdd�}|jj|�|jj|j	��dS(NRYRssome/file.proto(
RxRyRR]RR�RR�R�R�(Rt	file_desc((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestAddFileDescriptor�scCs�t|t�r(tj�dkr(dSntjjtjj	�}tjjt
jj	�}tjjtjj	�}|jj
|�|jj
|�|jj
|�tj||j�tj||j�dS(NRY(RxRyRR]RR�R�R
R�R�RRRR�t
TEST1_FILEt	CheckFilet
TEST2_FILE(Rtmore_messages_desct
test1_desct
test2_desc((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestComplexNesting�s			(t__name__t
__module__R!R$R)R*RWRfRgRuRvR}R�R�R�R�R�R�R�R�R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR?s,			%		R										
			
	 	&	tDefaultDescriptorPoolTestcBseZd�Zd�ZRS(cCsItj�|_tjjtjj�|_	tjjt
jj�|_dS(N(R
R�RRR�R�RR�R�R�RR�(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pytsetUp�s
		cCs|j|jjd�tj�|j|jjd�tjj�|j|jjd�tjjjd�|j|jj	d�tj
j�|j|jjd�tjjd�|j|jj
d�tjjjd	�|j|jjd
�tjjd�dS(Nsgoogle/protobuf/unittest.protosprotobuf_unittest.TestAllTypess-protobuf_unittest.TestAllTypes.optional_int32R�sprotobuf_unittest.ForeignEnums*protobuf_unittest.optional_int32_extensiontoptional_int32_extensions*protobuf_unittest.TestAllTypes.oneof_fieldR~sprotobuf_unittest.TestServicetTestService(R�RRRR�R;R�R`RDRbtForeignEnumRaR�RcRMRdtservices_by_name(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFindMethods�s.

	
	(R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s	tCreateDescriptorPoolTestcBseZd�ZRS(cCs�tj�|_tjjtjj�|_	tjjt
jj�|_|jj|j	�|jj|j�|jjtjjt
jj��|jjtjjtjj��|jjtjjtjj��dS(N(R
R�RRR�R�RR�R�R�RR�R�RRR(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�s		(R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�sRycBseZd�ZRS(cCs�tjjtjj�|_tjjtjj�|_t	j
�}|j|j�|j|j�|jtjjtjj��|jtjjt
jj��|jtjjtjj��tjd|�|_dS(Nt
descriptor_db(RR�R�RR�R�R�RR�RR�R�RRRR
R�R(RR�((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�(s		(R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyRy%st	ProtoFilecBs eZddd�Zd�ZRS(cCs=||_||_||_|p$g|_|p3g|_dS(N(RRtmessagestdependenciestpublic_dependencies(RRRR�R�R�((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt__init__;s
			c	Cs�|j|j�}|j|j|j�|j|j|j�g|jD]}|j^qH}|j|j|�g|jD]}|j^qz}|j|j|�x3|jj�D]"\}}|j|d||�q�WdS(N(
RRRRR�R�R�titemst	CheckTypeR>(	RttestRR�tftdependencies_namestpublic_dependencies_namesRtmsg_type((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�CsN(R�R�R>R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�9stEnumTypecBseZd�Zd�ZRS(cCs
||_dS(N(tvalues(RR�((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�QscCs|j|}|j||j�dj|j|g�}|j||j�|j||j�|j||j�x�t|j�D]~\}\}}	|j	|}
|j||
j�|j||
j
�|j|	|
j�|j||
j�|j
||j�q�WdS(Nt.(tenum_types_by_nameRRtjoinR=R?tfilet	enumerateR�RqtindexRrttypeRtenum_values_by_name(RR�tmsg_descRR�t	enum_desctexpected_enum_full_nameR�R�Rrt
value_desc((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�Ts
"
(R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�Os	tMessageTypecBs eZedd�Zd�ZRS(cCs.||_||_||_|p$g|_dS(N(t	type_dictt
field_listt
is_extendableR�(RR�R�R�R�((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�fs			c
Css|dkr4|j|}dj|j|g�}n%|j|}dj|j|g�}|j||j�|j||j�|j||j�|j|j	|�|j|j
|j
�x3|jj�D]"\}}|j
||||�q�Wx<t|j�D]+\}\}}	|	j|||||�qWx<t|j�D]+\}\}}	|	j|||||�q@WdS(NR�(R>RR�Rtnested_types_by_nameR=RRR?R�R�R�R�R�R�R�t
CheckFieldR�(
RR�tcontaining_type_descRR�tdesctexpected_full_nametsubtypeR�R|((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�ms 

""N(R�R�R�R>R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�dst	EnumFieldcBseZd�Zd�ZRS(cCs||_||_||_dS(N(Rrt	type_nameRJ(RRrRRJ((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s		c	Cs=|j|}|j|j}|j||j�dj|j|g�}|j||j�|j||j�|j|j|j�|jt	j
j|j�|jt	j
j
|j�|j|j�|j|j|jj|j�|j|j|jj�|j||j�|j||j�|j||j�dS(NR�(RDR�RRRR�R=R�RrRtFieldDescriptort	TYPE_ENUMR�tCPPTYPE_ENUMtcpp_typeRHRIRqRJR@RAR?RFR�(	RR�R�RR�R�t
field_descR�texpected_field_full_name((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s"


(R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�s	tMessageFieldcBseZd�Zd�ZRS(cCs||_||_dS(N(RrR(RRrR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s	c	Cs.|j|}|j|j}|j||j�dj|j|g�}|j||j�|j||j�|j|j|j�|jt	j
j|j�|jt	j
j
|j�|j|j�|j||j�|j||j�|j||j�tj�dkr*|jtt|d�ndS(NR�RYRJ(RDR�RRRR�R=R�RrRRtTYPE_MESSAGER�tCPPTYPE_MESSAGERR@RIR?RER�RR]R"tNotImplementedErrortgetattr(	RR�R�RR�R�R	tfield_type_descR
((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s"

(R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�s	tStringFieldcBseZd�Zd�ZRS(cCs||_||_dS(N(RrRJ(RRrRJ((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s	cCs�|j|}|j||j�dj|j|g�}|j||j�|j||j�|j|j|j�|jtjj	|j
�|jtjj|j�|j
|j�|j|j|j�|j||j�dS(NR�(RDRRR�R=R�RrRRtTYPE_STRINGR�tCPPTYPE_STRINGRRHRIRJR�(RR�R�RR�R�R	R
((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s

(R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�s	tExtensionFieldcBseZd�Zd�ZRS(cCs||_||_dS(N(Rrt
extended_type(RRrR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s	cCs|j|}|j||j�dj|j|g�}|j||j�|j|j|j�|j||j�|jtjj	|j
�|jtjj|j�|j
|j�|j|j�|j||j�|j||j�|j|j|jj�|j||j�dS(NR�(R�RRR�R=RrR�RRRR�R
RR@RIRHtis_extensiontextension_scopeRERR?R�(RR�R�RR�R�R	R
((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR��s

(R�R�R�R�(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�s	tAddDescriptorTestcBs�eZd�Zejej�dkd�d��Zd�Zejej�dkd�d��Z	ejej�dkd�d��Z
ejej�dkd�d��Zd�Zd	�Z
d
�Zd�ZRS(cCs�tj�}|jtjj�|jd|j|d�j�|j	t
��|j|d�WdQX|jtjjj�|jd|j|d�j�|jd|jd�j
�|jd|j|d�j
�dS(Nsprotobuf_unittest.TestAllTypess,protobuf_unittest.TestAllTypes.NestedMessagesgoogle/protobuf/unittest.proto(R
R�t
AddDescriptorRR�R�RR;R=R"R#t
NestedMessageRRR%(RtprefixR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt_TestMessage�s,
RYs7With the cpp implementation, Add() must be called firstcCs|jd�|jd�dS(NRXR�(R(R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestMessages
cCs�tj�}|jtjj�|jd|j|d�j�|j	t
��|j|d�WdQX|jtjjj�|jd|j|d�j�|jd|j
d�j�|jd|j|d�j�dS(Nsprotobuf_unittest.ForeignEnums(protobuf_unittest.ForeignEnum.NestedEnums)protobuf_unittest.TestAllTypes.NestedEnumsgoogle/protobuf/unittest.proto(R
R�tAddEnumDescriptorRR�R�RRbR=R"R#R�t
NestedEnumRRR%(RRR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt	_TestEnums,
cCs|jd�|jd�dS(NRXR�(R (R((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestEnum,s
cCs_tj�}|jt��|jd�WdQX|jtj�|jd|jd�j	�dS(Nsprotobuf_unittest.TestService(
R
R�R"R#RdtAddServiceDescriptorRt_TESTSERVICERR=(RR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestService2scCs_tj�}|jtj�|jd|jd�j�|jt	��|j
d�WdQXdS(Nsgoogle/protobuf/unittest.protosprotobuf_unittest.TestAllTypes(R
R�tAddFileDescriptorRR�RRRR"R#R%(RR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestFile=s
cCsqtj�}tjj}|jt|j|�tj�}tjj	|�|j
|�|j|j|��dS(N(R
R�RR�RR"R#RR�tCopyToProtoR�RH(RRtproto_file_nameR�((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestEmptyDescriptorPoolMs
c	Cs�tj�}tjdddd�}|jjdd�|j|�|j|jd�j	d�|j|j
d�j	d�tjdd�}|jjdd�}|jjddd	d
dtjj
dtjj�|jjdd
�}|jjddd	d�|jjdd�tj�}|j|�|jd|j
d�j	�|jd
|jd
�j	�|jd|jd�j	�dS(NRssome/file.protoRtMessagespackage.Messagessome/filename/container.protot
TopMessagetbbRriR�RztTopEnumtFOREIGN_FOOit
TopService(R
R�RR�REtaddR�RRRR;R|tFieldDescriptorProtot
TYPE_INT32tLABEL_OPTIONALRFR�R�RbRd(RRR�t
file_protot
message_protot
enum_proto((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestCustomDescriptorPoolYs6	
			

	cCs�tj�}d}tjd|�}tj}d|jj|_|j	|�|j
|�}|j�}|jd|j|j�|j
||j��dS(Ns9file_descriptor_options_with_custom_descriptor_pool.protoRtfoo(R
R�RR�R	tfoo_optionstoptionst
Extensionstfoo_nameR�Rt
GetOptionsRR�(RRt	file_nametfile_descriptor_prototextension_idR�R:((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt1testFileDescriptorOptionsWithCustomDescriptorPoolxs	
c
Cs�tj�}|jt��|jd�WdQX|jt��|jd�WdQX|jt��|jd�WdQX|jt��|jd�WdQX|jt��|jd�WdQXdS(Ni(	R
R�R"R[RRR"R�R%(RR((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyttestAddTypeError�s(R�R�RtunittesttskipIfRR]RR R!R$R&R)R7RARB(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyR�s		
			s4google/protobuf/internal/descriptor_pool_test1.protosgoogle.protobuf.python.internaltALPHAiR�iRtEPSILONitZETAitETAitTHETAiR�tnested_fieldtthetatDeepNestedMessagetbetatdeep_nested_messageiRtnested_messageR�R�tGAMMAtDELTAitIOTAi	tKAPPAi
tLAMBDAitMUitlambdatdeltatDescriptorPoolTest2s4google/protobuf/internal/descriptor_pool_test2.prototNUi
tXIitOMICRONitPIitRHOitSIGMAitsigmatnuR�tdescriptor_pool_testi�tDescriptorPoolTest3R�s,google/protobuf/internal/more_messages.protoR�t__main__(,t__doc__t
__author__tostsyst	unittest2RCtImportErrortgoogle.protobufRRRRtgoogle.protobuf.internalRRRRRR	R
RRR
RRtobjectRtTestCaseR�R�RyR�R�R�RRRRRtTrueR�R�R�tmain(((sQ/usr/lib/python2.7/site-packages/google/protobuf/internal/descriptor_pool_test.pyt<module> s�
��# �
"	

Hacked By AnonymousFox1.0, Coded By AnonymousFox