Your IP : 3.146.206.87


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

�
Du�ac@stdZddlZddlZddlZddlZddlZyddlZWnek
rqddlZnXddl	m
Z
ddl	mZddl	mZddl	m
Z
ddl	mZddl	mZdd	l	mZdd
l	mZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZejZdefd��YZdefd��YZdefd��YZdefd��YZ defd��YZ!defd��YZ"defd ��YZ#d!efd"��YZ$d#efd$��YZ%d%efd&��YZ&e'd'krpej(�ndS((siUnittest for reflection.py, which also indirectly tests the output of the
pure-Python protocol compiler.
i����N(tunittest_import_pb2(tunittest_mset_pb2(tunittest_pb2(tdescriptor_pb2(t
descriptor(tmessage(t
reflection(ttext_format(tapi_implementation(tmore_extensions_pb2(tmore_messages_pb2(tmessage_set_extensions_pb2(twire_format(t	test_util(ttesting_refleaks(tdecodert_MiniDecodercBskeZdZd�Zd�ZeZeZeZeZd�Z	e	Z
d�Zd�Zd�Z
d�ZRS(s�Decodes a stream of values from a string.

  Once upon a time we actually had a class called decoder.Decoder.  Then we
  got rid of it during a redesign that made decoding much, much faster overall.
  But a couple tests in this file used it to check that the serialized form of
  a message was correct.  So, this class implements just the methods that were
  used by said tests, so that we don't have to rewrite the tests.
  cCs||_d|_dS(Ni(t_bytest_pos(tselftbytes((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt__init__Os	cCs%tj|j|j�\}|_|S(N(Rt
_DecodeVarintRR(Rtresult((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt
ReadVarintSs!cCstj|j��S(N(RtZigZagDecodeR(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt
ReadSInt64\scCstj|j��S(N(Rt	UnpackTagR(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytReadFieldNumberAndWireTypeascCs=tjd|j|j|jd!�d}|jd7_|S(Ns<fii(tstructtunpackRR(RR((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt	ReadFloatds*cCs=tjd|j|j|jd!�d}|jd7_|S(Ns<dii(RRRR(RR((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt
ReadDoubleis*cCs|jt|j�kS(N(RtlenR(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytEndOfStreamns(t__name__t
__module__t__doc__RRt	ReadInt32t	ReadInt64t
ReadUInt32t
ReadUInt64Rt
ReadSInt32RRR R"(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyREs						tReflectionTestcBsSeZd�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�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZGdF�ZHdG�ZIdH�ZJdI�ZKdJ�ZLdK�ZMdL�ZNdM�ZOdN�ZPd[dO�ZRdP�ZSeTjUeVjW�dQkp	eVjX�dRkdS�dT��ZYdU�ZZdV�Z[dW�Z\dX�Z]dY�Z^dZ�Z_RS(\cCsU|jt|�t|��x2tt|��D]}|j||||�q/WdS(N(tassertEqualR!trange(Rtvaluestothersti((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytassertListsEqualtsc	Cswtjdddddddd�}|jd|j�|jd|j�|jd|j�|j|jd��dS(Ntoptional_int32itoptional_doubleg+�)K@toptional_stringtoptional_float(	RtTestAllTypestNoneR,R2R3R4tassertFalsetHasField(Rtproto((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestScalarConstructorys		cCs�tjdddddgdddgd	tttgd
dgdd�}|jddddgt|j��|jddgt|j��|jtttgt|j	��|jdgt|j
��|jgt|j��dS(
Ntrepeated_int32iiiitrepeated_doubleg�G�z��?g+�)K@t
repeated_booltrepeated_stringR4trepeated_float(RR6tTruetFalseR7R,tlistR<R=R>R?R@(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedScalarConstructor�s			%"cCs�tjdtjjdtjj�tjjdtjj�gdtjdd�tjdd�tjdd�gdtjj�tjjd	d
�tjjd	d�g�}|jtjjdtjj�tjjdtjj�gt|j	��|jtjdd�tjdd�tjdd�gt|j
��|jtjj�tjjd	d
�tjjd	d�gt|j��dS(Ntrepeated_nested_messagetbbtrepeated_foreign_messagetci���i�it
repeatedgrouptaii(RR6t
NestedMessagetFOOtBARtForeignMessaget
RepeatedGroupR,RCRERGRI(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt testRepeatedCompositeConstructor�s6	cCs�tjdddddddgdtttgdtjjd	tjj�tjjd	tjj�gd
tjdd�tjdd
�tjdd�gdd�}|j	d|j
�|j	d|j�|j	ddgt|j
��|j	tttgt|j��|j	tjjd	tjj�tjjd	tjj�gt|j��|j	tjdd�tjdd
�tjdd�gt|j��|j|jd��dS(NR2iR4R=g�G�z��?g+�)K@R>RERFRGRHi���i�itoptional_nested_message(RR6RARBRKRLRMRNR7R,R2R4RCR=R>RERGR8R9(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMixedConstructor�s:		"cCs�|jttjdd�|jttjdd�|jttjdd�|jttjdd�|jttjddg�|jttjdd�|jttjddg�|jttjdd�|jttjddg�dS(	NR2tfooR4i�RQR<R?RE(tassertRaisest	TypeErrorRR6(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestConstructorTypeError�s$cCs�tjdd�}|jd|j��tjdtjj��}|jd|j��tjddg�}|jd|j��tjdtjj�g�}|jd|j��dS(NR2iiRQiR<RE(RR6R,tByteSizeRK(RR((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testConstructorInvalidatesCachedByteSize�s		cCs�tj�}|j|jd��|jd|j�|j|jd��d|_|j|jd��|jd�|j|jd��dS(NR2ii(RR6t
assertTrueR9R,R2t
ClearField(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSimpleHasBits�s	
csG�fd�}|dd�|dd�|dd�|dd	�dS(
Ncs�tj�}t||�}t||�}�jd|��j|j|���j|j|��d}t|||��j|t||��|}�j|j|���j|j|��|j|�t||�}�j|j|���j|j|���jdt||���j||k	�t|||��j|j|���j|j|���jdt||��dS(Nii(RR6tgetattrR,RYR9tsetattrRZ(tcomposite_field_nametscalar_field_nameR:tcomposite_fieldtoriginal_scalar_valuetnew_valtold_composite_field(R(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytTestCompositeHasBits.s,
t
optionalgroupRJRQRFtoptional_foreign_messageRHtoptional_import_messagetd((RRd((RsL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt!testHasBitsWithSinglyNestedScalars
"*


cCs%tj�}|j}~d|_dS(Ni(RR6RQRF(RR:tnested((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestReferencesToNestedMessage]s	cCsrtj�}|j}|jd�|j||jk	�d|_|j|jd��|jd|jj�dS(NRQii(RR6RQRZRYRFR9R,(RR:Rj((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt0testDisconnectingNestedMessageBeforeSettingFieldes	
	cCsKtj�}|j}|jd�~~tj�tj�}|j}dS(NRQ(RR6RQRZtgctcollect(RR:Rj((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt5testGetDefaultMessageAfterDisconnectingDefaultMessagens	

cCs�tj�}|j}d|_|j|jd��|jd�|jd|j�|jd|jj�|j||jk	�d|_|j|jd��|jd|jj�dS(NiRQii(RR6RQRFRYR9RZR,(RR:Rj((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt/testDisconnectingNestedMessageAfterSettingField{s		
	cCsKtj�}|j|jd��|jd�|j|jd��dS(NRQ(RR6RYR9RZ(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt0testDisconnectingNestedMessageBeforeGettingField�s
cCsotj�}tj�}d|j_|j|�|j|jd��|jd�|j|jd��dS(NiRQ(RR6RQRFt	MergeFromRYR9RZ(Rtproto1tproto2((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testDisconnectingNestedMessageAfterMerge�s

cCsLtj�dkrdStj�}d|j_|jd�~tj�dS(Ntpythonitoptional_lazy_message(	RtTypeRR6RwRFRZRmRn(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt"testDisconnectingLazyNestedMessage�s
cCs�tj�}|jjjd�|jdg|jj�|j|jd��|jd�|j|jd��|jj	j
�|j|jd��dS(NiRQ(RtTestNestedMessageHasBitsRQtnestedmessage_repeated_int32tappendR,RYR9RZt%nestedmessage_repeated_foreignmessagetadd(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt&testHasBitsWhenModifyingRepeatedFields�s
cCsqtj�}|j|jd��|jd|jjjjjj�|j|jd��d|jjjjj_|jd|jjjjjj�|j|jd��|j|jjd��|j|jjjd��|j|jjjjd��|j|jjjjjd��|j|jjjjjjd��|j|jjjjjjd��dS(NRFiiRJR2(RtTestMutualRecursionARYR9R,RFRJR2(Rtrecursive_proto((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt!testHasBitsForManyLevelsOfNesting�s"""&cCs�tj�}d|_d|_d|_|j}|j|jjddf|jjddf|jjddfg|j	��d|j_
|j|jjddf|jjddf|jjddf|jjd|fg|j	��dS(	NiiRSR2toptional_fixed32R4i{RQ(RR6R�R2R4RQR,t
DESCRIPTORtfields_by_namet
ListFieldsRF(RR:tnested_message((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSingularListFields�s$				

	c
Cs tj�}|jjd�|jjd�|jjd�|jjddg�|jjg�|jjd�|jjd�td�D��d	|_|j	|j
|jjd
d	f|jjdddgf|jjddgf|jjd
dddddgfg|j
��dS(NiiiRStbartbazcss|]}t|�VqdS(N(tstr(t.0tx((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pys	<genexpr>�siiR2R<trepeated_fixed32R?t0t1(RR6R�R|R<R?textendR-R2R>R,R�R�R�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedListFields�s" 	
cCsztj�}d|jtj<d|jtj<d|jtj<|jtjdftjdftjdfg|j��dS(NiiRS(RtTestAllExtensionst
Extensionstoptional_fixed32_extensiontoptional_int32_extensiontoptional_string_extensionR,R�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSingularListExtensions�scCstj�}|jtjjd�|jtjjd�|jtjjd�|jtjjd�|jtjjd�|jtjjd�d|jtj<|jtjdftjddgftjdgftjdddgfg|j	��dS(NiiiRSR�R�i(
RR�R�trepeated_fixed32_extensionR|trepeated_int32_extensiontrepeated_string_extensionR�R,R�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedListExtensions�scCs�tj�}tj|�tj|j|jjddftjdf|jjddftjdf|jjddfg|j	��dS(	Ntmy_intiit	my_stringRSR�tmy_floatg�?(
RtTestFieldOrderingsR
tSetAllFieldsAndExtensionstmy_extension_intR,R�R�tmy_extension_stringR�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestListFieldsAndExtensionss
cCs�tj�}|jd|j�|jd|j�|jd|j�|jd|j�|jd|j�|jd|j�|jd|j	�|jd|j
�|jd|j�|jd|j�|jd|j
�|jd|j�|jt|j�|jd|j�|jd|j�|jd|j�|jd|j�|jd|j�|jd|j�|jd|j�|jd	|j�|jd
|j�|jd|j�|jd|j�|jd
|j�|jd|j�|jd|j�|jt|j �|jd|j!�|jd|j"�|jtjj#|j$�|jtj%|j&�|jt'j(|j)�tj*�}|jd|j+�dS(Nigti)i*i+i,i���i.i/i0i1i���g�I@gd�@thellotworlduሴ(,RR6R,R2toptional_int64toptional_uint32toptional_uint64toptional_sint32toptional_sint64R�toptional_fixed64toptional_sfixed32toptional_sfixed64R5R3RBt
optional_boolR4toptional_bytest
default_int32t
default_int64tdefault_uint32tdefault_uint64tdefault_sint32tdefault_sint64tdefault_fixed32tdefault_fixed64tdefault_sfixed32tdefault_sfixed64t
default_floattdefault_doubleRAtdefault_booltdefault_stringt
default_bytesRMtdefault_nested_enumtFOREIGN_BARtdefault_foreign_enumRt
IMPORT_BARtdefault_import_enumtTestExtremeDefaultValuestutf8_string(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestDefaultValuessJ
cCs&tj�}|jt|jd�dS(Ntnonexistent_field(RR6RTt
ValueErrorR9(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt testHasFieldWithUnknownFieldName@scCs&tj�}|jt|jd�dS(NR�(RR6RTR�RZ(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt"testClearFieldWithUnknownFieldNameDscsftj��x!td�D]}�jj�qWtj�}�j|�|jt�fd��dS(Ni
cs�jdS(Ni(trepeated_message((R:(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt<lambda>QR�(RtTestRequiredForeignR-R�R~tCopyFromRTt
IndexError(RR0Rt((R:sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestClearRemovesChildrenHs
cCs�tj�}|jtt|dd�|jtt|ddg�|jtt|dd�|jtt|jdd�|jtt|jdd�|jtt|dd�dS(	NR<i
RQiRFi"tsome_attributeR�(RR6RTtAttributeErrorR]RER@(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestDisallowedAssignmentsSs


cCs�tj�}|jtt|dd�|jtt|dd�|jtt|dd�|jtt|dd�|jtt|dd�|jtt|dd�|jtt|d	d�tj�d
kr�|jtt|dd�n	d|_dS(NR2g�������?RSR4i
R�R�R5R3Rv(RR6RTRUR]RRxR�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSingleScalarTypeSafetyhscs���fd�}|ddt�|dd
t�|ddt�y
t}Wntk
ret}nXtjd�dkr�|dd|�n|ddt�|d	d|�|d	d|�|dd|�|dd|�dS(s}Verifies setting of scalar integers.

    Args:
      integer_fn: A function to wrap the integers that will be assigned.
    cs}tj�}�|�}t|||��jt||�|�tj�}|j|j���jt||�|�dS(N(RR6R]tassertIsInstanceR\tParseFromStringtSerializeToString(t
field_nametvaluet
expected_typeR:Rt(t
integer_fnR(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytTestGetAndDeserialize}sR2iiR�tLiiR�i<R�Ni@i@lli@li@l(tinttlongt	NameErrorRtcalcsize(RR�R�t
integer_64((R�RsL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytassertIntegerTypesws	


cCs|jd��dS(NcSs|S(N((R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR��R�(R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestIntegerTypes�scCs|jtj�dS(N(R�R
tNonStandardInteger(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNonStandardIntegerTypes�scCs]tj�}|jt��d|_WdQX|jtd��tjdd�|_WdQXdS(Nt2tmy_errori(	RR6RTRUR�tassertRaisesRegexptRuntimeErrorR
R�(Rtpb((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestIllegalValuesForIntegers�s
cs���fd�}|ddd�|ddd�|ddd�|d
dd�tj�}�jttf���d�|_WdQXtj�}�d�|_�jd|j�dS(s�Verifies bounds checking for scalar integer fields.

    Args:
      integer_fn: A function to wrap the integers that will be assigned.
    cs�tj�}�|�}�|�}t|||��j|t||��t|||��j|t||���jttft|||d��jttft|||d�dS(Ni(RR6R]R,R\RTR�RU(R�texpected_mintexpected_maxR�(R�R(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytTestMinAndMaxIntegers�sR2iiR�il��R�i?R�l����Nll����ll��ll����ll����ll����(RR6RTR�RUR�toptional_nested_enumR,(RR�R�R�((R�RsL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytassetIntegerBoundsChecking�s
cCs|jd��dS(NcSs|S(N((R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR��R�(R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSingleScalarBoundsChecking�scCs|jtj�dS(N(R�R
R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt)testNonStandardSingleScalarBoundsChecking�scCs'tj�}|jt|jjd�|jt|jjd�|jt|jd�|jt|jd�|jjd�d|jd<|jt|jj	dd�|jt|jj	dd�|jt|jj	dg�|jt|jj	dd�|jjd	�|jt|jj	dd�dS(
Ng�������?RSi
iii�tabctindexR�(
RR6RTRUR<R|R?trepeated_bytesR�t__setitem__(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedScalarTypeSafety�s

cCswtj�}|jd|j�d|_|jd|j�d|_|jd|j�d|_|jd|j�dS(Niil���l����(RR6R,R2R�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt!testSingleScalarGettersAndSetters�s			cCsstj�}|jd�d|_|j|jd��|jd�|jd|j�|j|jd��dS(NR2ii(RR6RZR2RYR9R,(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSingleScalarClearField�s
	
cCs�tj�}|jd|j�|jdtjj�|jd|j�|jdtjj�|jd|j�|jdtjj�dS(Niii(RR6R,RLRMtBAZ(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt	testEnums�scCs~|jdtjjtj��|jdtjjtj��|jdtjjtj��|jttjjd�tj	�}|jd|j
j|j��|jdtj	j
j|j��|jd|j
j|j��|jdtj	j
j|j��|jd|j
j|j
��|jdtj	j
j|j
��|jt|j
jd�|jttj	j
jd�dS(NtFOREIGN_FOOR�tFOREIGN_BAZi0,RLRMR�(R,RtForeignEnumtNameR�R�RRTR�R6t
NestedEnumRLRMR�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt
testEnum_Names2												cCs~|jtjtjjd��|jtjtjjd��|jtjtjjd��|jttjjd�tj	�}|j|j
|jjd��|j|j
tj	jjd��|j|j|jjd��|j|jtj	jjd��|j|j
|jjd��|j|j
tj	jjd��|jt|jjd�|jttj	jjd�dS(	NR�R�RtFORLRMR�tFoo(R,RR�RtValueR�RRTR�R6RLRRMR�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestEnum_Value"s2			cCs	|jdddgttjj���|jdddgttjj���|jdddgttjj���tj�}|jddd	d
gt|jj���|jddd
dgt|jj���|jddddgt|jj���dS(NR�R�RiiiRLRMR�tNEGiiii����(R�i(R�i(Ri(RLi(RMi(R�i(R	i����(	R,RCRRtkeysR.titemsR6R(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestEnum_KeysAndValues>s++cCs�tj�}|j|j�|jdt|j��|jjd�|jjd�|jjd�|j|j�|jdt|j��|jdddg|j�|jd|jd�|jd|jd�|jt|jj	d�|jt|jj	d�|jt
|jj	d	�|jt
|jj	d�d
|jd<|jdd
dg|j�|jjdd�|jddd
dg|j�|jjd
�|jdd
dg|jdd!�|jddd
dd
g|j�d�t
d�D�|jdd+|jddddd
g|j�dddg|jdd+|jddddd
g|j�g}x|jD]}|j|�q{W|jddddd
g|�|jd=|jdddd
g|j�|jd3|jddg|j�|jjddg�|jddddg|j�|jd�|j|j�|jdt|j��|jjd�|jd|jd�d|jd<|jd|jd�ddddg|j(|jd=|jdddg|j�|jd=|jddg|j�|jt|jjd�|jt|jjd�|jdd5|jdg|j�|jdd5|jdg|j�dS(Niii
iii����i�i.���RSiiiiicss|]}|VqdS(N((R�R0((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pys	<genexpr>rsii#i(i-i
R<i����i����i,idi'(RR6RYR<R,R!R|RTR�t__getitem__RUR7tinsertR-R�RZt__delitem__(RR:RR0((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedScalarsMsl
## ""







cCs�tj�}|j|j�|jdt|j��|jjd�|jjd�|jjd�|jjd�|jdt|j��|jjd�|jdt|j��|jd|jd�|jd|jd�|jd|jd�|jjd�|jdt|j��|jd|jd�|jd|jd�|jjd�|jdt|j��|jd|jd�|jt	|jjd�dS(	Niii
iiiii{(
RR6RYR<R,R!R|tremoveRTR�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedScalarsRemove�s*cCs$tj�}|j|j�|jdt|j��|jj�}|jj�}|j|j�|jdt|j��|j||g|j�|j|tjj	�|j
t|jjd�|j
t|jjd�|j
t
|jjd�|j
t
|jjd�|jj�}|jj�}|jj�}|j|||g|jdd!�|j|||||g|j�|j||g|jd �|j|||g|jd�|j||jd�|j|g|jd �g}x|jD]}|j|�qW|j|||||g|�|jd=|j||||g|j�|jd3|j||g|j�tjj	dd�}	tjj	dd�}
|jj|	|
g�|jdt|j��|j|	|jd�|j|
|jd	�|j
t
|jj|	�|j
t
|jjdg�tj�}|j
t
|jj|g�|jd
�|j|j�|jdt|j��|jjdd�|jdt|j��|jd|jdj�|j
t
|jjd�|j
t��d|jd<WdQXdS(Niii�i.���RSiiRFiREi(RR6RYRER,R!R~R1R�RKRTR�R
RUR7R|R�RZRFt	Exception(RR:tm0tm1tm2tm3tm4RR0tn1tn2twrong_message_type((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedComposites�s~

				

cCs�tj�}|jdt|j��|jj�}t|j�|_|jj�}t|j�|_|j||k�|jj�}t|j�|_|j|||g|j�|jdt|j��|jj	|�|jdt|j��|j||jd�|j||jd�|j
t|jj	|�|j
t|jj	d�|jdt|j��|jj	|�|jdt|j��|j||jd�dS(Niiii(
RR6R,R!RER~RFRYR1RRTR�R7(RR:RRR((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedCompositeRemoves*csmtj�dkrdStj}|dddddddd	d
|jd|jd|jd
ddddddddtdddt	j
��}tjdddddddddgdgd|gdgdt	j��	�dt
jtjtj�f�fd��Y}|�}|jd|j�|j|jd��d|_|jd|j�|j|jd��dS(NRvtnamet	foo_fieldt	full_namesMyProto.foo_fieldR�itnumberittypetcpp_typetlabelt
default_valuetcontaining_typetmessage_typet	enum_typetis_extensiontextension_scopetoptionstMyPrototfilenametignoredtnested_typest
enum_typestfieldst
extensionstMyProtoClasscseZ�ZRS((R#R$R�((tmydescriptor(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR3Hsi(RRxRtFieldDescriptort
TYPE_INT64t
CPPTYPE_INT64tLABEL_OPTIONALR7RBRtFieldOptionst
DescriptortMessageOptionstsixtwith_metaclassRtGeneratedProtocolMessageTypeRtMessageR,RRYR9(RR5tfoo_field_descriptorR3tmyproto_instance((R4sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestHandWrittenReflection4s.			.		cs�tj�dkrdS�fd��d�_tj�}d|_tj}�|d|j��|d|j��|d|j	��|d|j
��jd	7_|jj�}d
|_|j|_
�j|_tjj|_tj|��|jd�jk�|jd�jk�|jd�jk�|jd�jk�|jd
�jk�dtjtjtj�f�fd��Y}|�}d
|_d|_t|_d|_|jj ddg�|j!�}tj"�|�}|j||k	�|j#||�|j#|j|j�|j#|j|j�|j#|j|j�|j#|j|j�|j#|j|j�dS(NRvcsO�jd7_|jj�}||_||_�j|_tjj|_	dS(Ni(
tfield_indextfieldR~RR"R!RtFieldDescriptorProtoR8R$(R:R�t
field_typet	new_field(tAddDescriptorField(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRHWs		itCarRtyeart	automatictpriceitownerst
CarMessagecseZ�ZRS((R#R$R�((tdesc(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRNwstpriusi�g���@tbobtsusan($RRxRCRtDescriptorProtoRREtTYPE_STRINGR6t	TYPE_BOOLtTYPE_DOUBLERDR~R"R!tLABEL_REPEATEDR$RtMakeDescriptorRYR�R<R=RR>RR?RJRARKRLRMR�R�tParseMessageR,(Rt
desc_prototfdpRGRNRPtserialized_priust	new_prius((RHROsL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestDescriptorProtoSupportQsN				.					cCs�tj�}tj}|j|j|��|jd|j|�|j|j|��d|j|<|jd|j|�|j|j|��|j|�|jd|j|�|j|j|��dS(Nii(RR�R�RYtHasExtensionR,R�tClearExtension(Rtextendee_protot	extension((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt'testTopLevelExtensionsForOptionalScalar�s	

cCs�tj�}tj}|jdt|j|��|j|jd�|jdg|j|�|j|}|j|�|jdt|j|��|j||j|k	�|j	t
tj|j|d�dS(NiRSRJ(
RR�R�R,R!R�R|R`RYRTRUtoperatortsetitem(RRaRbtstring_list((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt'testTopLevelExtensionsForRepeatedScalar�s	

cCs=tj�}tj}|j|j|��|jd|j|j�|j|j|��d|j|_|jd|j|j�|j|j|��|j|}|j|�|j||j|k	�d|_|jd|j�|j|j	d��|j|j|��|j
ttj
|j|d�dS(Niii*RHRJ(RR�t"optional_foreign_message_extensionRYR_R,R�RHR`R9RTRURdRe(RRaRbtforeign_message((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testTopLevelExtensionsForOptionalMessage�s"	

	cCstj�}tj}|jdt|j|��|j|j�}d|_|jd|j|dj�d|_|jd|j|dj�|j|}|j|�|jdt|j|��|j	||j|k	�|j
ttj
|j|d�dS(Niii*RJ(RR�trepeatedgroup_extensionR,R!R�R~RJR`RYRTRURdRe(RRaRbtgroupt
group_list((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testTopLevelExtensionsForRepeatedMessage�s			

cCs�tj�}tjj}|j|j|��|j|}|jd|j�|j|j|��d|_|jd|j|j�|j|j|��|j	|�|j||j|k	�|j|j|��dS(Nii(
RR�tTestRequiredtsingleRYR_R�R,RJR`(RRaRbtrequired((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNestedExtensions�s
	
cCsvtjj}|j|jtjjd��|j|jd�jtjj�|j	dt
|jtjj���dS(Nis*protobuf_unittest.optional_int32_extensioni(
RR�tpoolRYtFindExtensionByNumberR�tassertIstFindExtensionByNameR&R,R!tFindAllExtensionsR6(RRs((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRegisteredExtensions�s	
cCs�tj�}|j|jd��|jd|jjtj�|j|jd��d|jjtj<|jd|jjtj�|j|jd��tj�}|j|jd��|jg|jjtj�|j|jd��|jjtjj	d�|jdg|jjtj�|j|jd��tj�}|j|jd��|jd|jjtj
j�|j|jd��d|jjtj
_|jd|jjtj
j�|j|jd��tj�}|j|jd��|jdt|jjtj
��|j|jd��|jjtj
j�}|j||jjtj
d�|j|jd��dS(Nt
submessageii(R	tTopLevelMessageRYR9R,RyR�toptional_int_extensiontrepeated_int_extensionR|toptional_message_extensiontforeign_message_intR!trepeated_message_extensionR~(Rttopleveltforeign((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testHasBitsForAncestorsOfExtendedMessage�sL		cCs_tj�}|j}tj}|j|}|j|�d|_|j||j|k	�dS(Ni(R	RzRyR}R�R`R~RY(RR�RaRbtextension_proto((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt*testDisconnectionAfterClearingEmptyMessage*s		

	cCstj�}|jt|jd�|jt|jd�|jt|jjd�|jt|jjdd�x�t	j
t	jt	jt	j
fD]g}|jt|j|�|jt|j|�|jt|jj|�|jt|jj|d�q�W|jt|jtj�dS(Ni�i(RR�RTtKeyErrorR_R`R�R
R�R	R{R}R|RR�(RRatunknown_handle((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestExtensionFailureModes4s&	cCsKtj�}tj|�|j�}tjj|�}|j||�dS(N(RR6R
tSetAllFieldsR�t
FromStringR,(RRststring1Rt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestStaticParseFromSs

cCsatj�}d|_tj�}d|_|j|�|jd|j�|jd|j�dS(NiR�(RR6R2R4RrR,(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromSingularField]s		
cCs�tj�}|jjd�|jjd�tj�}|jjd�|j|�|jd|jd�|jd|jd�|jd|jd�dS(Niii(RR6R<R|RrR,(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromRepeatedFieldjs
cCsKtj�}d|j_tj�}|j|�|jd|jj�dS(Ni(RR6ReRJRrR,(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromOptionalGroupxs

cCs,tj�}|jj�}d|_|jj�}d|_tj�}|jj�}d|_|j|�|jd|jdj�|jd|jdj�|jd|jdj�tj�}|jj|j�|jd|jdj�|jd|jdj�|jd|jdj�dS(Ni{iAi�iii(RR6RER~RFRrR,(RRstmRttproto3((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt"testMergeFromRepeatedNestedMessage�s"			
cCsntj�}tj|�tj�}|j|�|j||�|j�}|j�}|j||�dS(N(RR6R
R�RrR,R�(RRsRtR�tstring2((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromAllFields�s

cCsStj�}d|jtj<tj�}|j|�|jd|jtj�dS(Ni(RR�R�R�RrR,(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromExtensionsSingular�s
cCs�tj�}|jtjjd�|jtjjd�tj�}|jtjjd�|j|�|jdt|jtj��|jd|jtjd�|jd|jtjd�|jd|jtjd�dS(Niiii(RR�R�R�R|RrR,R!(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromExtensionsRepeated�s
cCs�tj�}|jtj}|j�}d|_|j�}d|_tj�}|jtj}|j�}d|_|j|�|jtj}|jdt|��|jd|dj�|jd|dj�|jd|dj�dS(Ni�iMioiiii(	RR�R�t!repeated_nested_message_extensionR~RFRrR,R!(RRstext1R�Rttext2((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt$testMergeFromExtensionsNestedMessage�s&
		
	

cCs\tj�}tj�}|j|j|jd��|j|�|j|jd��dS(NRQ(RR6RQR8R9Rr(Rtmessage1tmessage2((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMergeFromBug�s
cCsjtj�}d|_d|_tj�}d|_|j|�|jd|j�|jd|j�dS(Nisimportant-textR�(RR6R2R4R�R,(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCopyFromSingularField�s			
cCs�tj�}|jjd�|jjd�tj�}|jjd�|j|�|jd|jd�|jd|jd�dS(Niii(RR6R<R|R�R,(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCopyFromRepeatedField�s
cCsntj�}tj|�tj�}|j|�|j||�|j�}|j�}|j||�dS(N(RR6R
R�R�R,R�(RRsRtR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCopyFromAllFields�s

cCs|tj�}|jjd�d|_d|_|j|�|jd|jd�|jd|j�|jd|j�dS(Niisimportant-texti(RR6R<R|R2R4R�R,(RRs((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCopyFromSelfs		
cCsHtj�dkrdStj�}tj�}|jt|j|�dS(NRv(RRxRR6R�RTRUR�(RRsRt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCopyFromBadTypes
cCs�tj�}d|_tj|�}|jd|j�|jjd�|jjd�tj|j�}|jddg|�|jj	�}d|_
tj|j�}|j|j|�d|_
|j|j|�dS(Niii(RR6R2tcopytdeepcopyR,R<R|RER~RFtassertNotEqual(RRsRtt	containerR�tmessages((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestDeepCopy s			cCs�tj�}tj�dkr.tj|�n
tj|�|j�|j|j	�d�tj�}|j||�tj
�}tj|�|j�|j|j	�d�tj
�}|j||�dS(NRvi(RR6RRxR
R�tSetAllNonLazyFieldstClearR,RWR�tSetAllExtensions(RR:tempty_proto((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt	testClear4s



cCsetj�}|j}|j�|j||jk	�d|_|j|jd��|jd|jj�tj�}|j}d|_|j}d|_	|j�|j||jk	�|j||jk	�|jd|j�|jd|j	�d|_d|_	|j
|jd��|jd|jj�|j
|jd��|jd|jj	�dS(	NiRQiiiiiRf(RR6RQR�RYRFR9R,RfRHR8(RR:RjR�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestDisconnectingBeforeClearKs.	
					
		cCs�tj�}d|j_|j}|j|jjd�|j|jjd�d|j_|j|jjd�|j|jd�d|_dS(Niiii(Rt
TestOneof2tfoo_messagetqux_intR,tfoo_lazy_message(RR�tsub_message((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestDisconnectingInOneoffs	cCs�tj�}d|_d|j_|jd|jj�|j|jd��|j}d|_|jd|j�|jd|j�|j|jd��dS(Ni
itoneof_uint32R�toneof_nested_message(	RR6R�R�RFR,R8R9toneof_string(RR:Rj((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt	testOneOfts			cCs+|j|j��|j�|j�dS(N(RYt
IsInitializedR�tSerializePartialToString(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytassertInitialized�s
cCsig}|j|j��|j|j|��|j|t|��|jtj|j�|j�dS(N(	R8R�R,R!RTRtEncodeErrorR�R�(RR:t
error_sizeterrors((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytassertNotInitialized�scCsZtj�}|j|�tj�}|j|�tj�}|j|d�d|_|_|_|j|�tj	�}|j|�d|j
_|j|d�d|j
_d|j
_|j|�|jj�}|j|d�d|_|_|_|j|�tj�}tjj
}|j|j�}|j|j�}|j|d�d|_d|_d|_|j|d�d|_d|_d|_|j|�tj�}tjj}d|j|_|j|d�d|j|_d|j|_|j|�g}tj�}|j|j|��|j|dddg�dS(	NiiiiiRJtbRH(RR6R�R�RoR�RJR�RHR�toptional_messageR�R~tmultiR�RpR8R�R,(RR:R�RbR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestIsInitialized�sV





						

tcppisBErrors are only available from the most recent C++ implementation.cCsd}d}tj�}||_||_|jj�}d|_tj||d|j��d}||_|jj�}d|_|j	t
���}tj||d|j��|jt|d�dt
|jd|j��|jdt|j��|jd	t|j��WdQXdS(
Ns!test_file_descriptor_errors.prototmsg1t
serialized_pbs)another_test_file_descriptor_errors.prototmsg2t	exceptions
%s not raisedR#s test_file_descriptor_errors.msg1(RtFileDescriptorProtoRtpackageR'R~RtFileDescriptorR�RTRURYthasattrR\texpectedtassertInR�R�(Rt	file_nametpackage_nametfile_descriptor_protoRtanother_file_nameRtcm((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestFileDescriptorErrors�s0			
		
cCs�tj�}|jtt|dd�|jt|j�tj	�tj	d�|_|j|jt
d��t
d�|_|j|jtj	d��|jtt|dd�djd�}||_d|_d|_dS(	NR�uunicode objecttTestingR4sa�auТестsutf-8R�(
RR6RTRUR]R,R"R4R<t	text_typeR�R�tencode(RR:t
utf8_bytes((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestStringUTF8Encoding�s				c
Cs�tj�}tj}|j}d}|jd�}||j|_|j�}|j|j	�t
|��tj�}|j
|�}|jt
|�|�tj�}	|jdt
|j��|j|jdjd�|j|jdjj|��|	j
|jdj�}|jt
|jdj�|�|jt|	j�tj�|j|	j|�|jdjj|t
|�d�}
t}y|	j
|
�Wntk
r�t}nX|	j}|j|p�t|�tk�dS(NuТестsutf-8iiiʿ�s�(RtTestMessageSettTestMessageSetExtension2tmessage_set_extensionR�R�R�R�R,RWR!Rt
RawMessageSettMergeFromStringtitemttype_idRYRtendswithR"R<R�treplaceRBtUnicodeDecodeErrorRAR(
RR:textension_messageRbt	test_utf8ttest_utf8_bytest
serializedtrawt
bytes_readR�tbadbytestunicode_decode_failedtstring_field((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestStringUTF8Serializations8		  	

	cCs/tjdd�}|jdtj|��dS(NR�s��u#optional_bytes: "\000\177\200\377"
(RR6R,R<R�(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestBytesInTextFormat=s	cCs=tj�}|jjtjj��|j|jd��tj�}|jjtjj��|j|jd��tj�}|jjd�}|j	d|�|j|jd��tj�}|jj
d�|j|jd��|j�}tj�}|j	t|�|j|��|j|jd��dS(NRQR�i(
RR6RQRrRKRYR9R�R�R,R�R�R!(RR:R�R�Rt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestEmptyNestedMessageBs*			cCsItj�}|j|jd��|jj�|j|jd��dS(NRe(RR6R8R9RetSetInParentRY(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSetInParent]s
cCs9ddlm}|jj�}|jd|jj�dS(s�Test that we can import nested messages from their __init__.py.

    Such setup is not trivial since at the time of processing of __init__.py one
    can't refer to its submodules by name in code, so expressions like
    google.protobuf.internal.import_test_package.inner_pb2
    don't work. They do work in imports, so we have assign an alias at import
    and then use that alias in generated code.
    i����(timport_test_packagei9N(tgoogle.protobuf.internalR�tmyprototOuterR,tinnerR�(RR�tmsg((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestPackageInitializationImportcsN(`R#R$R1R;RDRPRRRVRXR[RiRkRlRoRpRqRuRyRR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRRRRRRBR^RcRgRjRnRrRxR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R7R�R�tunittesttskipIfRRxtVersionR�R�R�R�R�R�R�(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR+rs�		
		"	#				Q				
	
		
	
								)						"				!											Z		S			=							1	
		
	
									
	
	
												:! 		6			tTestAllTypesEqualityTestcBs,eZd�Zd�Zd�Zd�ZRS(cCs"tj�|_tj�|_dS(N(RR6tfirst_prototsecond_proto(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytsetUp{scCs|jtt|j�dS(N(RTRUthashR�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNotHashablescCs|j|j|j�dS(N(R,R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSelfEquality�scCs|j|j|j�dS(N(R,R�R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestEmptyProtosEqual�s(R#R$R�RRR(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR�ys			tFullProtosEqualityTestcBsqeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(s@Equality tests using completely-full protos as a starting point.cCsBtj�|_tj�|_tj|j�tj|j�dS(N(RR6R�R�R
R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR��scCs|jtt|j�dS(N(RTRUR�R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR�scCs*|j|jd�|jd|j�dS(N(R�R�R7R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNoneNotEqual�scCs6tj�}|j|j|�|j||j�dS(N(RRoR�R�R�(Rtthird_proto((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNotEqualToOtherMessage�scCs|j|j|j�dS(N(R,R�R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestAllFieldsFilledEquality�scCsR|jjd7_|j|j|j�|jjd�|j|j|j�dS(NiR2(R�R2R�R�RZ(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNonRepeatedScalar�scCs�|jjjd7_|j|j|j�|jjjd8_|j|j|j�|jjjd�|j|j|j�|jjj|jj_|j|j|j�|jjd�|j|j|j�dS(NiRFRQ(R�RQRFR�R�R,RZ(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNonRepeatedComposite�scCsS|jjjd�|j|j|j�|jjd�|j|j|j�dS(NiR<(R�R<R|R�R�RZ(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedScalar�scCs�|jjdjd7_|j|j|j�|jjdjd8_|j|j|j�|jjj�|j|j|j�|jjj�|j|j|j�dS(Nii(R�RERFR�R�R,R~(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedComposite�scCs6|jjd�d|j_|j|j|j�dS(NR2i(R�RZR�R2R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNonRepeatedScalarHasBits�scCsu|jjd�|jjjd�|j|j|j�d|jj_|jjjd�|j|j|j�dS(NRQRFi(R�RZR�RQR�RFR,(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestNonRepeatedCompositeHasBits�s(R#R$R%R�RRRRRR	R
RRR
(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR�s										tExtensionEqualityTestcBseZd�ZRS(cCsDtj�}tj�}|j||�tj|�|j||�tj|�|j||�|jtjcd7<|j||�|jtjcd8<|j||�|jtj�d|jtj<|j||�d|jtj<|j||�tj�}tj�}|jd|jtj�|j||�dS(Nii(	RR�R,R
R�R�R�R�R`(RR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestExtensionEquality�s*

(R#R$R(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR�stMutualRecursionEqualityTestcBseZd�ZRS(cCsptj�}tj�}|j||�d|jjj_|j||�d|jjj_|j||�dS(Ni(RR�R,RFRJR2R�(RR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestEqualityWithMutualRecursions(R#R$R(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRstByteSizeTestcBs�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@tj�|_tj�|_tj�|_tj�|_	dS(N(
RR6R:R	tExtendedMessagetextended_prototTestPackedTypestpacked_prototTestPackedExtensionstpacked_extended_proto(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR�scCs
|jj�S(N(R:RW(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytSizescCs|jd|jj��dS(Ni(R,R:RW(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestEmptyMessagescCsNtj�}|jd|j��tjdd�}|jd|j��dS(NiR�ii(RR6R,RW(RR:tproto_kwargs((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSizedOnKwargsscs��fd�}|dd�|dd�xGttddd�tdd��D]!\}}|d|>d|�qNW|dd�|d	d�|dd�dS(Ncs7�jj�|�j_�j|d�j��dS(Ni(R:R�R�R,R(R0texpected_varint_size(R(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pytTest#s
iiii?i'i����i
i����ll����(tzipR-(RRR0t	num_bytes((RsL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestVarints"s

1

cCs�d|j_|jd|j��d|j_|jdt|jj�|j��dd|j_|jdt|jj�|j��dS(NR�iR�R�i�i(R:R4R,RR!(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestStrings1s&cCs�d|j_|jd|j��tj�|_d|j_|jd|j��tj�|_d|j_|jd|j��tj�|_d|j_|jd|j��tj�|_d|j_	|jd|j��tj�|_dS(Ni�ii	gX9��v��?i@i(
R:R�R,RRR6R�R5R3R�(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestOtherNumerics>scCs)d|jj_|jd|j��dS(	Niiiii@iii(R:RQRFR,R(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCompositesXscCs-d|jj_|jdd|j��dS(Niiiii ii(R:ReRJR,R(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt
testGroups`scCsD|jjjd�|jjjd�|jdd|j��dS(Ni
i�iiii(R:R<R|R,R(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRgscCs7|jjjddg�|jdd|j��dS(Ni
i�iiii(R:R<R�R,R(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedScalarsExtendmscCsm|jjjd�|jjjd�|jdd|j��|jjjd�|jd|j��dS(Ni
i�iiiii(R:R<R|R,RR(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRrs
cCsG|jjj�}|jjj�}d|_|jd|j��dS(	Niiiiiiii(R:RER~RFR,R(Rtforeign_message_0tforeign_message_1((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRzs	cCss|jjj�}|jjj�}d|_|jd|j��tj|jj�}|jjd=|jd|j��|jjj�}d|_|jd|j��|jjd=|jd|j��|jjd=|jd|j��|jdt|��|dd5t	j
�dkr=|jdt|��n|d=t	j
�dkro|jdt|��ndS(Ni	iiiiRvi����iiiiiiiiiiiiii	i
iii(R:RER~RFR,RR�R�R!RRx(RR'R(REtforeign_message_2((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedCompositesDelete�s,	
	


cCsG|jjj�}|jjj�}d|_|jd|j��dS(	Niiiiiii	i(R:RIR~RJR,R(Rtgroup_0tgroup_1((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestRepeatedGroups�s	cCs�tj�}|jd|j��tj}d|j|<|jd|j��tjjjd}|j	t
��d|j|<WdQXdS(NiiiR2(RR�R,RWR�R�R6R�R�RTR�(RR:RbRD((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestExtensions�s	
cCs�d|j_|jd|jj��d|j_|jd|jj��|jjd�|jd|jj��tj}d|jj|<|jd|jj��d|jj|<|jd|jj��|jj	|�|jd|jj��dS(Niii�iR2i(
R:R2R,RWRZR	R{RR�R`(RRb((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt)testCacheInvalidationForNonrepeatedScalar�s	cCs_|jjjd�|jd|jj��|jjjd�|jd|jj��d|jjd<|jd|jj��|jjd�|jd|jj��tj}|jj	|}|jd�|jd|jj��|jd�|jd	|jj��d|d<|jd
|jj��|jj
|�|jd|jj��dS(Niiii�iR<iiii(R:R<R|R,RWRZR	R|RR�R`(RRbtrepeated((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt&testCacheInvalidationForRepeatedScalar�s$	


cCs�d|jj_|jd|jj��d|jj_|jd|jj��|jjjd�|jd|jj��|jjd�|jd|jj��tj�d	kr�|jj}|jjd�d|_|jd|jj��ntj	}|j
j|}|jd|j
j��d|_|jd
|j
j��d|_|jd|j
j��|j
j
|�|jd|j
j��dS(Niii�iRHiRfiRvi(R:RfRHR,RWRZRRxR	R}RR�R~R`(RtchildRb((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt*testCacheInvalidationForNonrepeatedMessage�s,				cCsu|jjj�}|jd|jj��|jjj�|jd|jj��d|_|jd|jj��|jjd�|jd|jj��tj}|j	j
|}|j�}|jd|j	j��|j�|jd|j	j��d|_|jd|j	j��|jd	�|jd|j	j��|j	j|�|jd|j	j��dS(
NiiiiRGiiiR~(
R:RGR~R,RWRHRZR	RRR�R~R`(Rtchild0Rbt
child_list((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt'testCacheInvalidationForRepeatedMessage	s(		
	
cCs�|jd|jj��|jjjd�|jjjd�d}|j||jj��|jjjd�|jjjd�d}|j|||jj��|jjd
�|j||jj��dS(Nii
i�iiig������@g
@itpacked_int32iiii(R,RRWR7R|t
packed_doubleRZ(Rtint_sizetdouble_size((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestPackedRepeatedScalars	scCsb|jd|jj��|jjtj}|jddddg�|jd|jj��dS(Niiiiii(R,RRWR�Rtpacked_fixed32_extensionR�(RRb((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestPackedExtensions0	s
	
(R#R$R�RRRR!R"R#R$R%RR&RRR*R-R.R/R1R3R6R;R=(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyRs,						
								'								tSerializationTestcBseZd�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�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsstj�}tj�}|j�}|j|j�t|��|jt|�|j|��|j||�dS(N(RR6R�R,RWR!R�(RR�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeEmtpyMessageF	s	cCs�tj�}tj�}tj|�|j�}|j|j�t|��|jt|�|j|��|j||�dS(N(	RR6R
R�R�R,RWR!R�(RR�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeAllFieldsP	s
	cCsdtj�}tj�}tj|�|j�}|jt|�|j|��|j||�dS(N(RR�R
R�R�R,R!R�(RR�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeAllExtensions[	s
	cCsctj�}tj�}d|j_|j�}|jt|�|j|��|j||�dS(Ni�(RR6ReRJR�R,R!R�(RR�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeWithOptionalGroupe	s	cCsntj�}d|_d	|_d|_d|_d|_d
|_tjj|j	��}|j
||�dS(Ni����ii(i����ii����ill����ll����ll����(RR6R2R�R�R�R�R�R�R�R,(RR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeNegativeValueso	s							cCs$tj�dkrdStj�}tj|�|j�}x�tt|�d�D]�}y�tj�}tj	�}|j
|d|�}|j||�y)|j
|d|�}|j||�Wn!tj
k
r�|jd�nXWqRtj
k
r|jtj
|j
|d|�qRXqRWdS(NRviis@Parsing unknown fields failed when parsing known fields did not.(RRxRR6R
R�R�R-R!tTestEmptyMessaget_InternalParseR,RtDecodeErrortfailRT(RR�R�ttruncation_pointR�tunknown_fieldstpostpos2((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestParseTruncated~	s&
cCs�tj�}d|_d|jtj<d|_d|jtj<d|_|j�}|j	|j
�t|��t|�}|j
}|j	dtjf|��|j	d|j��|j	dtjf|��|j	d|j��|j	dtjf|��|j	d|j��|j	dtjf|��|j	d|j��|j	dtjf|��|j	d|j��dS(Niiiii(R
tOutOfOrderFieldsR�R�R�R�R�R2R�R,RWR!RRRtWIRETYPE_VARINTR&R'R(R)R*(RR:R�RhtReadTag((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestCanonicalSerializationOrder�	s(				cCs6tj�}tj|�|j�}tj|�dS(N(RR�R
R�R�t#ExpectAllFieldsAndExtensionsInOrder(RR:R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testCanonicalSerializationOrderSameAsCpp�	s
cCs�tj�}|jjd�d|_d|j_|j�}tj�}|jjd�d|_d|j_|j|�}|j	t
|�|�|j	ddgt|j��|j	d|j�|j	d|jj�dS(Ntfoobarii*R�idi�(RR6R?R|R2RQRFR�R�R,R!RC(RR�R�R�tbytes_parsed((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt'testMergeFromStringWhenFieldsAlreadySet�	s		c
Cs�tj�}tj}tj}|j}|j}tj}d|j|_d|j|_d|j|_	|j
�}tj�}|j
t|jj�j�|j
t|�|j|��|j
dt|j��tj�}	|j
t|jdj�|	j|jdj��|j
d|	j�tj�}
|j
t|jdj�|
j|jdj��|j
d|
j�tj�}|j
t|jdj�|j|jdj��|j
d|j	�tj�}|j
t|�|j|��|j
d|j|j�|j
d|j|j�|j
d|j|j	�|j
|j�t|��|j
|j�t|��dS(Ni{RSR�iiii(RR�tTestMessageSetExtension1R�R�tmessage_set_extension3R�R0R�ttextR�RR�R,RBR�t
GetOptionstmessage_set_wire_formatR!R�R�RtTestMessageSetExtension3RW(
RR:textension_message1textension_message2t
extension1t
extension2t
extension3R�R�R�R�tmessage3Rt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMessageSetWireFormat�	sR								cCs9tj�}|jj�}d|_tj}tj�}d|_|j�|_	|jj�}d|_tj}tj�}d|_|j�|_	|jj�}d|_tj
�}d|_|j�|_	|j�}tj�}|j
t|�|j|��tj}|j}|j
d|j|j�dS(Ni���i90i���i:0i���RS(RR�R�R~R�RRVR0R�RR�R�R�R,R!R�R�R�(RR�R�R\R�R�R:R^((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(testMessageSetWireFormatUnknownExtension	
s4											cCs�tj�}tj|�|j�}tj�}|jt|�|j|��tj�}d|_	|j�}tj�}|jt|�|j|��dS(Nl����(
RR6R
R�R�RDR,R!R�R�(RR:R�Rt((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestUnknownFields2
s
			cCsUy|�Wn*|k
r7}|j|t|��dSX|jdt|���dS(sEThis method checks if the excpetion type and message are as expected.Ns
%s not raised(R,R�tfailureException(Rt	exc_classtcallable_objR�tex((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt_CheckRaisesM
scCs�tj�}|jtj|jd�|j�}tj�}|j|jd��|j	|�|j|jd��d|_
|jtj|jd�|j�}d|_|jtj|jd�|j�}d|_|j�}|j�}tj�}|j
t|�|j|��|j
d|j
�|j
d|j�|j
d|j�|j
t|�|j|��|j
d|j
�|j
d|j�|j
d|j�dS(NsHMessage protobuf_unittest.TestRequired is missing required fields: a,b,cRJisFMessage protobuf_unittest.TestRequired is missing required fields: b,cisDMessage protobuf_unittest.TestRequired is missing required fields: ci(RRoRiRR�R�R�R8R9R�RJR�RHR,R!R�(RR:tpartialRtR�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeUninitializedX
sL
					cCs�tj�}|j�d|j_|jtj|jd�d|j_d|j_	|j�d|j
j�_d|j
j�_|jtj|jd�d|j
d_d|j
d_	d|j
d_d|j
d_	|j�dS(NisoMessage protobuf_unittest.TestRequiredForeign is missing required fields: optional_message.b,optional_message.ciis�Message protobuf_unittest.TestRequiredForeign is missing required fields: repeated_message[0].b,repeated_message[0].c,repeated_message[1].a,repeated_message[1].ci(RR�R�R�RJRiRR�R�RHR�R~(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt$testSerializeUninitializedSubMessage�
s*

cCs�tj�}tj�}tj|�|j�}|j|j�t|��|j|�}|j|j�|�|j||�dS(N(	RRR
tSetAllPackedFieldsR�R,RWR!R�(RR�R�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestSerializeAllPackedFields�
s
cCsjtj�}tj�}tj|�|j�}|j|�}|j|j�|�|j||�dS(N(RRR
tSetAllPackedExtensionsR�R�R,RW(RR�R�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt testSerializeAllPackedExtensions�
s
cCs�tj�}|jjddg�|jjd�|j�}tj�}|jjd�|jjddg�|jjd�|jt	|�|j
|��|jdddg|j�|jdddg|j�|jdg|j�dS(Niig@ig�?g@i(RRR7R�R8R|R�t
packed_sint32R,R!R�(RR�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt1testMergePackedFromStringWhenSomeFieldsAlreadySet�
s	cCs�tj�}|jjddddg�|jjddg�|jjd�|j�}|j|j	�t
|��t|�}|j}|jdt
jf|��|jd|j��|jd|j��|jd|j��|jd|j��|jd|j��|jd	t
jf|��|jd
|j��|jd|j��|jdt
jf|��|jd|j��|jd|j��|jd|j��|j|j��dS(Niii�ig�?g@�@g@iZidiieiiiii(RRR7R�R8tpacked_floatR|R�R,RWR!RRRtWIRETYPE_LENGTH_DELIMITEDR&RR RYR"(RR:R�RhRO((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestPackedFieldsWireFormat�
s,	cCs}tj�}tj|�tj�}|j�}|jt|�|j|��tj�}tj	|�|j||�dS(N(
RtTestUnpackedTypesR
tSetAllUnpackedFieldsRR�R,R!R�Rm(RtunpackedtpackedR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestParsePackedFromUnpacked�
s
	
cCs}tj�}tj|�tj�}|j�}|jt|�|j|��tj�}tj	|�|j||�dS(N(
RRR
RmRvR�R,R!R�Rw(RRyRxR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestParseUnpackedFromPacked�
s
	
cCs�tj�}|jtjjjd�|jtjjd�|jtjjd�|jtjjd�|jtjjd�|jtjj	d�|jtjj
d�|jtjjd�|jtjjd�dS(	Niiiiii.i0i3(
RR6R,RKtBB_FIELD_NUMBERtOPTIONAL_INT32_FIELD_NUMBERtOPTIONALGROUP_FIELD_NUMBERt$OPTIONAL_NESTED_MESSAGE_FIELD_NUMBERt!OPTIONAL_NESTED_ENUM_FIELD_NUMBERtREPEATED_INT32_FIELD_NUMBERtREPEATEDGROUP_FIELD_NUMBERt$REPEATED_NESTED_MESSAGE_FIELD_NUMBERt!REPEATED_NESTED_ENUM_FIELD_NUMBER(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestFieldNumbersscCs�|jtjjjd�|jtjjd�|jtjjjd�|jtjjd�|jtjjd�|jtj	d�|jtj
jd�|jtjd�|jtjjd�|jtj
d�|jtjjd�|jtjd�|jtjjd�|jtjd�|jtjjd�|jtjd�|jtjjd	�|jtjd	�|jtjjd
�|jtjd
�dS(Ni�i�iiiiii.i0i3(R,RRoRpR!tSINGLE_FIELD_NUMBERR�tMULTI_FIELD_NUMBERR�t%OPTIONAL_INT32_EXTENSION_FIELD_NUMBERtoptionalgroup_extensiont$OPTIONALGROUP_EXTENSION_FIELD_NUMBERt!optional_nested_message_extensiont.OPTIONAL_NESTED_MESSAGE_EXTENSION_FIELD_NUMBERtoptional_nested_enum_extensiont+OPTIONAL_NESTED_ENUM_EXTENSION_FIELD_NUMBERR�t%REPEATED_INT32_EXTENSION_FIELD_NUMBERRkt$REPEATEDGROUP_EXTENSION_FIELD_NUMBERR�t.REPEATED_NESTED_MESSAGE_EXTENSION_FIELD_NUMBERtrepeated_nested_enum_extensiont+REPEATED_NESTED_ENUM_EXTENSION_FIELD_NUMBER(R((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestExtensionFieldNumberss0

cCs�tjdddddtdddtjjd	d�d
tjdd�dtjjd
tjddddg�	}|j|j��|j|j	d��|j|j	d��|j|j	d��|j|j	d��|j|j	d��|j|j	d
��|j|j	d��|j|j	d
��|j
d|j�|j
d|j�|j
t|j
�|j
d|j�|j
d|jj�|j
d|jj�|j
tjj|j�|j
tj|j�|j
dddg|j�dS(NR2iR4RSR�R�R�RQRFRfRHR�toptional_foreign_enumR<ii(RR6RARKRNRLR�RYR�R9R,R2R4R�R�RQRFRfRHR�R�R<(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestInitKwargs+s:		
cCs d�}|jt|d�dS(NcSstjdd�}dS(Ntunknown(RRD(tunused_proto((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt(InitalizeEmptyMessageWithExtraKeywordArgKss9Protocol message TestEmptyMessage has no "unknown" field.(RiR�(RR�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestInitArgsUnknownFieldNameJs
	cCs�tjdddddd�}|j|j��|j|jd��|j|jd��|j|jd��|j|jd��|jd|j�|jd|j�|jd|j�dS(NRJiR�RHtdummy2(	RRoRYR�R9R,RJR�RH(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestInitRequiredKwargsRsc	Cs?tjdtjdddddd��}|j|j��|j|jd��|j|jj��|j|jjd��|j|jjd��|j|jjd��|j|jjd��|jtjdddddd�|j�|jd|jj�|jd|jj	�|jd|jj
�dS(NR�RJiR�RHR�(RR�RoRYR�R9R�R,RJR�RH(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestInitRequiredForeignKwargs]s	!!
cCswtjddddg�}|j|j��|jd|jd�|jd|jd�|jd|jd�dS(NR<iiii(RR6RYR�R,R<(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestInitRepeatedKwargsms
(R#R$R?R@RARBRCRLRPRRRURbRcRdRiRkRlRnRpRrRuRzR{R�R�R�R�R�R�R�(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR>D	s8	
		
	
						6	)			3	!	
												tOptionsTestcBseZd�Zd�ZRS(cCsTtj�}|jt|jj�j�tj�}|jt	|jj�j�dS(N(
RR�R,RAR�RYRZRR6RB(RR:((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestMessageOptionsws		cCs�tj�}d|_d|_x3|j�D]%\}}|jt|j�j�q+Wtj	�}|j
jd�|jjd�xL|j�D]>\}}|jt
|j�j�|jtjj|j�q�WdS(Nig@(RR6R2R3R�R,RBRYRyRR7R|R8RARR5RWR$(RR:tfield_descriptort_((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestPackedOptionss		(R#R$R�R�(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR�us	tClassAPITestcBs�eZejej�dko-ej�dkd�d��Zd�Ze	j
d�d��Ze	j
d�d��Ze	j
d�d��Z
RS(	R�is6C++ implementation requires a call to MakeDescriptor()cCs$tjddddddgdgdgdg�}tjd	d
ddddgd|gdgdg�}tjddddddgdgdgdg�}tjd
dddddgd||gdgdg�}tj|�}|jd	|j�|jd|j�|jd|jj�dS(Ntleafspackage.parent.child.leafR�R&R1R/R0R2R2spackage.parent.childtsiblingspackage.parent.siblingtparentspackage.parent(RR:R7Rt	MakeClassR�t__dict__R2(Rt	leaf_desct
child_desctsibling_desctparent_desct
message_class((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt!testMakeClassWithNestedDescriptor�s(			cCs4d|d}tj�}tj||�|j�S(s Get a serialized representation of a test FileDescriptorProto.

    Args:
      name: All calls to this must use a unique message name, to avoid
          collisions in the cpp descriptor pool.
    Returns:
      A string containing the serialized form of a test FileDescriptorProto.
    smessage_type {  name: "si"  field {    name: "flat"    number: 1    label: LABEL_REPEATED    type: TYPE_UINT32  }  field {    name: "bar"    number: 2    label: LABEL_OPTIONAL    type: TYPE_MESSAGE    type_name: "Bar"  }  nested_type {    name: "Bar"    field {      name: "baz"      number: 3      label: LABEL_OPTIONAL      type: TYPE_MESSAGE      type_name: "Baz"    }    nested_type {      name: "Baz"      enum_type {        name: "deep_enum"        value {          name: "VALUE_A"          number: 0        }      }      field {        name: "deep"        number: 4        label: LABEL_OPTIONAL        type: TYPE_UINT32      }    }  }}(RR�RtMergeR�(RRtfile_descriptor_strtfile_descriptor((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt_GetSerializedFileDescriptor�s)s MakeDescriptor is not repeatablecs�tj�dkrdStj�}|j|jd��tj|jd��dt	j
tjt
j�f�fd��Y}|�}d}tj||�|j|jddd	g�dS(
s7Test that the generated class can parse a flat message.RvNtAitMessageClasscseZ�ZRS((R#R$R�((tmsg_descriptor(sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR��ssflat: 0 flat: 1 flat: 2 ii(RRxRR�R�R�RRXR'R<R=RR>RR?RR�R,tflat(RR�R�R�tmsg_str((R�sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt0testParsingFlatClassWithExplicitClassDeclaration�s
.	cCs�tj�}|j|jd��tj|jd�}tj|�}|�}d}t	j
||�|j|jdddg�dS(s7Test that the generated class can parse a flat message.tBisflat: 0 flat: 1 flat: 2 iiN(
RR�R�R�RRXR'RR�RR�R,R�(RR�R�t	msg_classR�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestParsingFlatClass�s	cCs�tj�}|j|jd��tj|jd�}tj|�}|�}d}t	j
||�|j|jj
jd�dS(s9Test that the generated class can parse a nested message.tCisbar {  baz {    deep: 4  }}iN(RR�R�R�RRXR'RR�RR�R,R�R�tdeep(RR�R�R�R�R�((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyttestParsingNestedClasss	(R#R$R�R�RRxR�R�R�RtSkipReferenceLeakCheckerR�R�R�(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyR��s!	8t__main__()R%R�RmRdR<Rt	unittest2R�tImportErrortgoogle.protobufRRRRRRRRR�RR	R
RRR
RRtBaseTestCasetobjectRR+R�RRRRR>R�R�R#tmain(((sL/usr/lib/python2.7/site-packages/google/protobuf/internal/reflection_test.pyt<module>#s`
	-�������V!�9��3�

?>