+
    BiW                      ^ RI Ht ^ RIHtHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ R	It^ R	It^ R	It^ R	It^ R	It^ R
IHtHt ^ RIHt ^ R	It^ RIHtH t H!t!H"t"H#t# R t$ ! R R]4      t% ! R R]4      t& ! R R]4      t' ! R R4      t( ! R R](4      t) ! R R4      t* ! R R]*])]4      t+ ! R R]*])]4      t, ! R R])]4      t- ! R  R!])]4      t. ! R" R#])]4      t/ ! R$ R%])]4      t0 ! R& R']4      t1 ! R( R)]4      t2 ! R* R+]4      t3 ! R, R-]4      t4 ! R. R/]4      t5 ! R0 R1]4      t6R2 t7] ! R3 R44      4       t8] ! R5 R64      4       t9R	# )7    )annotations)deque
namedtuple)contextmanager)Decimal)BytesIO)Any)TestCasemock)pathname2urlN)definefield)DRAFT202012)FormatCheckerTypeChecker
exceptions	protocols
validatorsc              #  t   "   V F-  pVP                  R R4       \        P                  ! R/ VB x  K/  	  R# 5i)messagezYou told me to fail!N )
setdefaultr   ValidationError)	validatorerrorsinstanceschemaeachs   &&&& ^/var/www/html/photoedit/myenv/lib/python3.14/site-packages/jsonschema/tests/test_validators.pyfailr       s2     	#9:((0400 s   68c                      ] tR t^#tR tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tRtR# )TestCreateAndExtendc                	   V P                  V P                  \        P                  \	        \        P                  4      4       V P                  V P                  \        P
                  \	        \        P
                  4      4       R R/V n        R\        /V n        \        4       V n	        \        P                  ! V P                  V P                  V P                  R7      V n        R# )$idzsome://meta/schemar    )meta_schemar   type_checkerN)
addCleanupassertEqualr   _META_SCHEMASdict_VALIDATORSr%   r    r   r&   create	Validatorselfs   &r   setUpTestCreateAndExtend.setUp$   s    $$))*	

 	""''(	
 "#78!4.'M#**((**
    c                	    V P                  V P                  P                  V P                  P                  V P                  P                  3V P
                  V P                  V P                  34       R # N)r(   r-   
VALIDATORSMETA_SCHEMATYPE_CHECKERr   r%   r&   r.   s   &r   
test_attrsTestCreateAndExtend.test_attrs9   s\    ))**++
   !!
	
r2   c                	d    R . /pV P                  V P                  V4      P                  V4       R# )r    N)r(   r-   r   r/   r   s   & r   	test_initTestCreateAndExtend.test_initF   s*    "/66?r2   c                	    R . /pV P                  V4      p\        VP                  R4      4      pV P                  V. 4       R# )r    helloN)r-   listiter_errorsr(   r/   r   r   r   s   &   r   test_iter_errors_successful/TestCreateAndExtend.test_iter_errors_successfulJ   s>    "NN6*	i++G45$r2   c           
     	\   R RR/./pV P                  V4      p\        P                  ! RRVR RR/.\        R .4      R7      p\	        VP                  R4      4      pV P                  \        V4      ^4       V P                  V^ ,          P                  4       VP                  4       4       R# )r    r   zWhoops!goodbye)r   r   r   validator_valueschema_pathN)	r-   r   r   r   r@   rA   r(   len	_contents)r/   r   r   expected_errorr   s   &    r   test_iter_errors_one_error.TestCreateAndExtend.test_iter_errors_one_errorQ   s    Iy123NN6*	#33'34vh
 i++I67Va(,,.0H0H0JKr2   c                	    R RR/RRRR/RR/./pV P                  V4      p\        VP                  R4      4      pV P                  \	        V4      ^4       R# )	r    r   FirstzSecond!r   asdfThirdrF   N)r-   r@   rA   r(   rI   rB   s   &   r    test_iter_errors_multiple_errors4TestCreateAndExtend.test_iter_errors_multiple_errorsb   sf    G$I{F;G$
 NN6*	i++I67Va(r2   c                	R   \         P                  ! R R/RR7      pV P                  \         P                  P                  R4       V P                  \         P
                  P                  R4       V P                  VP                  R4       V P                  VP                  R4       R# )r$   	something
my versionr%   versionMyVersionValidatorN)	r   r,   r'   r)   popr+   r(   __name____qualname__r/   r-   s   & r   .test_if_a_version_is_provided_it_is_registeredBTestCreateAndExtend.test_if_a_version_is_provided_it_is_registeredo   s    %%, 
	 	
0044kB
..22LA++-AB//1EFr2   c                	$   \         P                  ! R R/RR7      pV P                  \         P                  P                  R4       V P                  \         P
                  P                  R4       V P                  \        V! / 4      4      R4       R# )r$   rU   rV   rW   z2MyVersionValidator(schema={}, format_checker=None)N)r   r,   r'   r)   rZ   r+   r(   reprr]   s   & r   	test_reprTestCreateAndExtend.test_repry   sp    %%, 
	 	
0044kB
..22LA2@	
r2   c                	L   \         P                  ! R R/RR7      pV P                  \         P                  P                  R4       V P                  \         P
                  P                  R4       V P                  \        V! R\        \        R4      4      /4      4      R4       R# )r$   rU   rV   rW   ai  zNMyVersionValidator(schema={'a': [0, 1, 2, 3, 4, 5, ...]}, format_checker=None)N)
r   r,   r'   r)   rZ   r+   r(   ra   r@   ranger]   s   & r   test_long_repr"TestCreateAndExtend.test_long_repr   s    %%, 
	 	
0044kB
..22LACeDk!2345'	
r2   c                	v    \         P                  ! / R 7      pV P                  \        V! / 4      4      R4       R# )r%   z)Validator(schema={}, format_checker=None)N)r   r,   r(   ra   r]   s   & r   test_repr_no_version(TestCreateAndExtend.test_repr_no_version   s/    %%"5	27	
r2   c                	   \         P                  ! R R/RR7      pV P                  \         P                  P                  R4       V P                  \         P
                  P                  R4       V P                  VP                  R4       R# )r$   rU   zfoo-barrW   FooBarValidatorN)r   r,   r'   r)   rZ   r+   r(   r\   r]   s   & r   -test_dashes_are_stripped_from_validator_namesATestCreateAndExtend.test_dashes_are_stripped_from_validator_names   sj    %%,
	 	
0044kB
..22I>//1BCr2   c                	    \        \        P                  4      p\        P                  ! R R /R7       V P	                  \        P                  V4       R# )idrj   N)r*   r   r)   r,   r(   )r/   originals   & r   6test_if_a_version_is_not_provided_it_is_not_registeredJTestCreateAndExtend.test_if_a_version_is_not_provided_it_is_not_registered   s:    
001tTl3118<r2   c                	.   R pRV/p\         P                  ! VRR R7       V P                  \         P                  P                  V4       V P                  \         P
                  P                  R4       V P                  V\         P                  4       R# )meta schema idrr   rV   c                &    V P                  R R4      # rr    getss   &r   <lambda>MTestCreateAndExtend.test_validates_registers_meta_schema_id.<locals>.<lambda>       AEE$Or2   r%   rX   id_ofNr   r,   r'   r)   rZ   r+   assertInr/   meta_schema_keymy_meta_schemas   &  r   'test_validates_registers_meta_schema_id;TestCreateAndExtend.test_validates_registers_meta_schema_id   sr    *0& +	

 	
0044oF
..22LAoz'?'?@r2   c                	*   R pRV/p\         P                  ! VRR7       V P                  \         P                  P                  V4       V P                  \         P
                  P                  R4       V P                  V\         P                  4       R# )meta schema $idr$   rV   rW   Nr   r   s   &  r   .test_validates_registers_meta_schema_draft6_idBTestCreateAndExtend.test_validates_registers_meta_schema_draft6_id   so    +1& 	
 	
0044oF
..22LAoz'?'?@r2   c                	  a \         P                  ! / RR 7      oT P                  \        ;QJ d6    V3R lR. 3RR	R
RR/ 3R3 4       F  '       d   K   R4       R# 	  R4       R# ! V3R lR. 3RR	R
RR/ 3R3 4       4      4       R# )r%   r   c              3  X   <"   T F  w  rS! / 4      P                  W!R 7      x  K!  	  R# 5i))r   typeN)is_type).0r   r   r-   s   &  r   	<genexpr>@TestCreateAndExtend.test_create_default_types.<locals>.<genexpr>   s3      'ND "%%x%CC's   '*arrayTNobjectFr   )booleanT)integer   )nullN)numberg      (@)stringfoo)r   r,   
assertTrueallr]   s   &@r   test_create_default_types-TestCreateAndExtend.test_create_default_types   s    %%"D	C  bM%#"$rN%'CC	
	
  bM%#"$rN%' 	
r2   c                ~   \         P                  ! R\         P                  P                  R,          RR/ //R7      pVP	                  RR/4       V P                  \        P                  4      ;_uu_ 4        VP	                  / 4       RRR4       V! RR/4      P                  R4       R#   + '       g   i     L+; i)	zY
One can create a validator class whose metaschema uses a different
dialect than itself.
$schemar$   notconstrj   r   barN)	r   r,   Draft202012Validatorr6   check_schemaassertRaisesr   SchemaErrorvalidater/   NoEmptySchemasValidators   & r   +test_check_schema_with_different_metaschema?TestCreateAndExtend.test_check_schema_with_different_metaschema   s     #-"3"3:::FFuM}#
 	 ,,eU^<z5566#004 7 	 /88? 76s   7B,,B<	c                    \         P                  ! RRR/./R\        /R7      pV P                  \        P
                  4      ;_uu_ 4        VP                  / 4       RRR4       R#   + '       g   i     R# ; i)z
A validator whose metaschema doesn't declare $schema defaults to its
own validation behavior, not the latest "normal" specification.
r    r   zMeta schema whoops!r   N)r   r,   r    r   r   r   r   r   s   & r   <test_check_schema_with_different_metaschema_defaults_to_selfPTestCreateAndExtend.test_check_schema_with_different_metaschema_defaults_to_self   sc     #-"3"39.C"D!EF~#
 z5566#004 7666s   A''A8	c                	   \        V P                  P                  4      p\        4       p\        P
                  ! V P                  R V/R7      pV P                  VP                  VP                  VP                  V P                  P                  3\        WR7      V P                  P                  V P                  P                  V34       R# )new)r   r   N)	r*   r-   r5   r   r   extendr(   r6   r7   )r/   rs   r   Extendeds   &   r   test_extendTestCreateAndExtend.test_extend   s    112h$$NNs|
 	##$$%%))	 X'**++		
r2   c                X  a  V 3R lpRpRRRV/p\         P                  ! VS P                   S P                  VR7      pS P                  VP	                  VP
                  4      V4       \         P                  ! V4      pS P                  VP	                  VP
                  4      V4       R# )z;
Extending a validator preserves its notion of schema IDs.
c                Z   < V P                  R SP                  P                  V 4      4      # )__test__)r|   r-   ID_OF)r   r/   s   &r   r   3TestCreateAndExtend.test_extend_idof.<locals>.id_of  s#    ::j$..*>*>v*FGGr2   zthe://correct/id/r$   zthe://wrong/id/r   )r%   r   r&   r   N)r   r,   r&   r(   r   r6   r   )r/   r   
correct_idr%   OriginalDeriveds   f     r   test_extend_idof$TestCreateAndExtend.test_extend_idof
  s    	H(
$

 $$#**	
 	(<(<=zJ##H-w':':;ZHr2   c                   RRRR//RRR^/p\         P                  ! V4      pV P                  VP                  ^%4      4       \         P                  ! \         P                  4      pV P                  V! V4      P                  ^%4      4       R# )	zF
Extending a validator preserves its notion of applicable validators.
$defstestr   r   $refz#/$defs/testmaximumN)r   Draft4Validatorr   is_validr   )r/   r   draft4r   s   &   r   !test_extend_applicable_validators5TestCreateAndExtend.test_extend_applicable_validators   s|     fvx01Nq
 ++F3+,##J$>$>?0045r2   )r-   r%   r&   r   N)r[   
__module__r\   __firstlineno__r0   r8   r<   rC   rL   rR   r^   rb   rg   rk   ro   rt   r   r   r   r   r   r   r   r   __static_attributes__r   r2   r   r"   r"   #   sn    
*
@%L")G



D=
AA
"@&5
,I,6r2   r"   c                  r   ] tR tRtR tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R  t"R! t#R" t$R# t%R$ t&R% t'R& t(R' t)R( t*R) t+R* t,R+ t-R, t.R- t/R. t0R/ t1R0 t2R1 t3R2 t4R3 t5R4 t6R5 t7R6 t8R7 t9R8 t:R9 t;R: t<R; t=R<t>R=# )>TestValidationErrorMessagesi2  c                	F   VP                  R \        P                  4      pVP                  V4       V! V.VO5/ VB p\	        VP                  V4      4      pV P                  VRV: 2R7       V P                  \        V4      ^RV: 2R7       V^ ,          P                  # )clszNo errors were raised for )msgz"Expected exactly one error, found )
rZ   r   _LATEST_VERSIONr   r@   rA   r   r(   rI   r   )r/   r   r   argskwargsr   r   r   s   &&&*,   r   message_for'TestValidationErrorMessages.message_for3  s    jj
 : :; 000	i++H56&@$MNK4VJ? 	 	

 ay   r2   c                	T    V P                  ^RR/R7      pV P                  VR4       R#    r   r   r   r   1 is not of type 'string'Nr   r(   r/   r   s   & r   test_single_type_failure4TestValidationErrorMessages.test_single_type_failure@  s-    ""Avx6H"I"=>r2   c                	V    V P                  ^RR./R7      pV P                  VR4       R# r   r   r   s   & r   test_single_type_list_failure9TestValidationErrorMessages.test_single_type_list_failureD  s/    ""Avz6J"K"=>r2   c                	j    RpV P                  ^R\        V4      /R7      pV P                  VR4       R# )r   r   r   z#1 is not of type 'string', 'object'N)r   r   )r   r@   r(   )r/   typesr   s   &  r   test_multiple_type_failure6TestValidationErrorMessages.test_multiple_type_failureH  s6    """AvtE{6K"L"GHr2   c                	    R RRR^/./pV P                  ^V\        P                  R7      pV P                  VR4       R# )r   nameFoominimumr   r   r   z1 is not of type 'Foo'Nr   r   Draft3Validatorr(   r/   r   r   s   &  r   #test_object_with_named_type_failure?TestValidationErrorMessages.test_object_with_named_type_failureM  sO    FE9a89:""** # 

 	":;r2   c                	T    V P                  ^R^/R7      pV P                  VR4       R# )r   r   r   z1 is less than the minimum of 2Nr   r   s   & r   test_minimum(TestValidationErrorMessages.test_minimumV  s,    ""Ay!n"E"CDr2   c                	T    V P                  ^R^ /R7      pV P                  VR4       R# )r   r   r   z"1 is greater than the maximum of 0Nr   r   s   & r   test_maximum(TestValidationErrorMessages.test_maximumZ  s,    ""Ay!n"E"FGr2   c                	    R Rr!RW//pV P                  R ^/V\        P                  R7      pV P                  VR4       R# r   r   dependenciesr   z'foo' is a dependency of 'bar'Nr   r/   dependonr   r   s   &    r    test_dependencies_single_element<TestValidationErrorMessages.test_dependencies_single_element^  sP    E 6,/""QZ** # 

 	"BCr2   c                	    R R^/./pV P                  ^R V./\        P                  R7      pV P                  VR4       R# )r   r   r   z+1 is not of type {'type': [{'minimum': 3}]}Nr   )r/   r   r   s   &  r   -test_object_without_title_type_failure_draft3ITestValidationErrorMessages.test_object_without_title_type_failure_draft3h  sT    )Q()""TF#** # 

 	9	
r2   c                	    R Rr!RW.//pV P                  R ^/V\        P                  R7      pV P                  VR4       R# r   r   r   s   &    r   test_dependencies_list_draft39TestValidationErrorMessages.test_dependencies_list_draft3t  R    E 64.1""QZ** # 

 	"BCr2   c                	    R Rr!RW.//pV P                  R ^/V\        P                  R7      pV P                  VR4       R# r   r   r   Draft7Validatorr(   r   s   &    r   test_dependencies_list_draft79TestValidationErrorMessages.test_dependencies_list_draft7~  r  r2   c                	x    V P                  ^.R. RR/\        P                  R7      pV P                  RV4       R# )   itemsadditionalItemsFr   z(2 was unexpected)Nr   r   r   r   r   s   & r   #test_additionalItems_single_failure?TestValidationErrorMessages.test_additionalItems_single_failure  sC    ""SR!2E:** # 

 	*G4r2   c                	z    V P                  . ROR. RR/\        P                  R7      pV P                  RV4       R# )r   r  r  Fr   z(1, 2, 3 were unexpected)Nr   r     r  r   s   & r   &test_additionalItems_multiple_failuresBTestValidationErrorMessages.test_additionalItems_multiple_failures  sA    ""R!2E:** # 

 	17;r2   c                	`    R pRR/pV P                  V^/VR7      pV P                  RV4       R# )r   additionalPropertiesFr   z('foo' was unexpected)Nr   r   )r/   
additionalr   r   s   &   r   (test_additionalProperties_single_failureDTestValidationErrorMessages.test_additionalProperties_single_failure  s9    
(%0""ZOF"K.8r2   c                	    R R/pV P                  \        P                  RR.4      VR7      pV P                  \	        R4      V4       V P                  \	        R4      V4       V P                  RV4       R# )r  Fr   r   r   zwere unexpected)N)r   r*   fromkeysr   ra   r   s   &  r   +test_additionalProperties_multiple_failuresGTestValidationErrorMessages.test_additionalProperties_multiple_failures  si    (%0""]]E5>2 # 

 	d5k7+d5k7+('2r2   c                	\    R ^/pV P                  RR/VR7      pV P                  RV4       R# )r   r   r   r   z12 was expectedNr  r   s   &  r   
test_const&TestValidationErrorMessages.test_const  s;    2""U^ # 
 	'1r2   c                	    R R^//pV P                  ^/ . .V\        P                  R7      pV P                  VR4       R# )containsr   r   z4None of [2, {}, []] are valid under the given schemaN)r   r   Draft6Validatorr(   r   s   &  r   test_contains_draft_61TestValidationErrorMessages.test_contains_draft_6  sP    wm,""R[** # 

 	B	
r2   c                	   \        RR 7      pVP                  R4      ! R 4       RR/pV P                  RVVR7      pV P                  \	        R4      V4       V P                  \	        R4      V4       V P                  RV4       R# )	)formatsthingc                    R # )Fr   )values   &r   r   QTestValidationErrorMessages.test_invalid_format_default_message.<locals>.<lambda>  s    er2   formatbla)r   r   format_checkerzis not aNr   )r   checksr   r   ra   )r/   checkerr   r   s   &   r   #test_invalid_format_default_message?TestValidationErrorMessages.test_invalid_format_default_message  sz    +w 34G$""" # 
 	d5k7+d7mW-j'*r2   c                	   R RRRRRR R/RR R///pV P                  R^{/V\        P                  R	7      pV P                  VR
P	                  \        R4      \        R4      \        R4      4      4       V P                  R^{RR/V\        P                  R	7      pV P                  VRP	                  \        R4      \        R4      \        R4      \        R4      4      4       R# )r   r   r  FpatternPropertiesz^abc$r   z^def$zebrar   z,{} does not match any of the regexes: {}, {}fishi  z.{}, {} do not match any of the regexes: {}, {}N)r   r   r   r(   r5  ra   r   s   &  r   1test_additionalProperties_false_patternPropertiesMTestValidationErrorMessages.test_additionalProperties_false_patternProperties  s    ((%%11( ""s^** # 

 	:AAWtG}d7m	
 ""sFC0** # 

 	<CCVd7mT']DM	
r2   c                	P    V P                  R RR7      pV P                  VR4       R# )rU   Fr   z'False schema does not allow 'something'Nr   r   s   & r   test_False_schema-TestValidationErrorMessages.test_False_schema  s0    ""  # 
 	"KLr2   c                	T    V P                  ^R^/R7      pV P                  VR4       R# )r  
multipleOfr   z3 is not a multiple of 2Nr   r   s   & r   test_multipleOf+TestValidationErrorMessages.test_multipleOf  s5    "" !$ # 
 	"<=r2   c                	T    V P                  . R ^/R7      pV P                  VR4       R# )minItemsr   z[] is too shortNr   r   s   & r   test_minItems)TestValidationErrorMessages.test_minItems  s,    ""B
A"G"34r2   c                	X    V P                  . ROR^/R7      pV P                  VR4       R# )r   maxItemsr   z[1, 2, 3] is too longNr  r   r   s   & r   test_maxItems)TestValidationErrorMessages.test_maxItems  s,    ""Iz1o"N"9:r2   c                	T    V P                  . R ^/R7      pV P                  VR4       R# )rJ  r   z[] should be non-emptyNr   r   s   & r   test_minItems_1+TestValidationErrorMessages.test_minItems_1   s,    ""B
A"G":;r2   c                	X    V P                  . ROR^ /R7      pV P                  VR4       R# )r   rN  r   z![1, 2, 3] is expected to be emptyNr  r   r   s   & r   test_maxItems_0+TestValidationErrorMessages.test_maxItems_0  s,    ""Iz1o"N"EFr2   c                	T    V P                  R R^/R7      pV P                  VR4       R# )rz   	minLengthr   z'' is too shortNr   r   s   & r   test_minLength*TestValidationErrorMessages.test_minLength  s5    ""# # 
 	"34r2   c                	T    V P                  R R^/R7      pV P                  VR4       R# )abc	maxLengthr   z'abc' is too longNr   r   s   & r   test_maxLength*TestValidationErrorMessages.test_maxLength  s5    ""# # 
 	"56r2   c                	T    V P                  R R^/R7      pV P                  VR4       R# )rz   rX  r   z'' should be non-emptyNr   r   s   & r   test_minLength_1,TestValidationErrorMessages.test_minLength_1  s-    ""BQ7G"H":;r2   c                	T    V P                  R R^ /R7      pV P                  VR4       R# )r\  r]  r   z'abc' is expected to be emptyNr   r   s   & r   test_maxLength_0,TestValidationErrorMessages.test_maxLength_0  s-    ""E;:J"K"ABr2   c                	T    V P                  / R ^/R7      pV P                  VR4       R# )minPropertiesr   z"{} does not have enough propertiesNr   r   s   & r   test_minProperties.TestValidationErrorMessages.test_minProperties  s-    ""B7K"L"FGr2   c                	`    V P                  R / R/ R/ /R^/R7      pV P                  VR4       R# )re   bcmaxPropertiesr   z3{'a': {}, 'b': {}, 'c': {}} has too many propertiesNr   r   s   & r   test_maxProperties.TestValidationErrorMessages.test_maxProperties"  sE    ""2sBR0#Q' # 
 	A	
r2   c                	T    V P                  / R ^/R7      pV P                  VR4       R# )rg  r   z{} should be non-emptyNr   r   s   & r   test_minProperties_10TestValidationErrorMessages.test_minProperties_1,  s-    ""B7K"L":;r2   c                	X    V P                  ^^/R^ /R7      pV P                  VR4       R# )r   rm  r   z{1: 2} is expected to be emptyNr   r   s   & r   test_maxProperties_00TestValidationErrorMessages.test_maxProperties_00  s9    ""V#Q' # 
 	"BCr2   c                	`    V P                  . RORRR/ / ./R7      pV P                  VR4       R# )r   r  FprefixItemsr   z1Expected at most 2 items but found 1 extra: 'foo'N)r   r  r   r   r   s   & r   test_prefixItems_with_items7TestValidationErrorMessages.test_prefixItems_with_items7  s@    """UMB8< # 
 	?	
r2   c                	`    V P                  . RORRR/ / ./R7      pV P                  VR4       R# )r   r  Frw  r   z6Expected at most 2 items but found 2 extra: ['foo', 5]Nr   r  r      r   r   s   & r   *test_prefixItems_with_multiple_extra_itemsFTestValidationErrorMessages.test_prefixItems_with_multiple_extra_itemsA  s@    ""%UMB8< # 
 	D	
r2   c                	T    V P                  R RR/R7      pV P                  VR4       R# )bbbpatternz^a*$r   z'bbb' does not match '^a*$'Nr   r   s   & r   test_pattern(TestValidationErrorMessages.test_patternK  s5    ""v& # 
 	"?@r2   c                	X    V P                  . R RR//R7      pV P                  VR4       R# )r+  r   r   r   z3[] does not contain items matching the given schemaNr   r   s   & r   test_does_not_contain1TestValidationErrorMessages.test_does_not_containR  s=    "" 23 # 
 	A	
r2   c                	`    V P                  R ^.RRR/R^/R7      pV P                  VR4       R# )r   r+  r   r   minContainsr   MToo few items match the given schema (expected at least 2 but only 1 matched)Nr   r   s   & r   test_contains_too_few1TestValidationErrorMessages.test_contains_too_few\  sG    ""QZ 2M1E # 
 	7	
r2   c           	     	d    V P                  R ^.RRR/R^R^/R7      pV P                  VR4       R# )	r   r+  r   r   r  maxContainsr   r  Nr   r   s   & r   &test_contains_too_few_both_constrainedBTestValidationErrorMessages.test_contains_too_few_both_constrainedg  sO    ""QZVX.qq # 
 		
r2   c                	`    V P                  . RORRR/R^/R7      pV P                  VR4       R# )	r   r+  r   r   r  r   :Too many items match the given schema (expected at most 2)Nr   r   bazr   r   s   & r   test_contains_too_many2TestValidationErrorMessages.test_contains_too_manyv  sA    ""* 2M1E # 
 	H	
r2   c           	     	p    V P                  R .^,          RRR/R^R^/R7      pV P                  VR4       R# )	r   r+  r   r   r  r  r   z:Too many items match the given schema (expected at most 4)Nr   r   s   & r   'test_contains_too_many_both_constrainedCTestValidationErrorMessages.test_contains_too_many_both_constrained  sO    ""Wq[VX.qq # 
 	H	
r2   c                	T    V P                  ^R^/R7      pV P                  VR4       R# )r  exclusiveMinimumr   z+3 is less than or equal to the minimum of 5Nr   r   s   & r   test_exclusiveMinimum1TestValidationErrorMessages.test_exclusiveMinimum  s8    ""&* # 
 	9	
r2   c                	T    V P                  ^R^/R7      pV P                  VR4       R# )r  exclusiveMaximumr   z.3 is greater than or equal to the maximum of 2Nr   r   s   & r   test_exclusiveMaximum1TestValidationErrorMessages.test_exclusiveMaximum  s1    ""A7I16M"N<	
r2   c                	V    V P                  / R R./R7      pV P                  VR4       R# )requiredr   r   z'foo' is a required propertyNr   r   s   & r   test_required)TestValidationErrorMessages.test_required  s/    ""B
UG7L"M"@Ar2   c                	^    V P                  R / /RR R.//R7      pV P                  VR4       R# )r   dependentRequiredr   r   z'bar' is a dependency of 'foo'Nr   r   s   & r   test_dependentRequired2TestValidationErrorMessages.test_dependentRequired  s@    ""R['%%)9: # 
 	"BCr2   c                	V    V P                  / R R./R7      pV P                  VR4       R# )oneOfFr   z.{} is not valid under any of the given schemasNr   r   s   & r   test_oneOf_matches_none3TestValidationErrorMessages.test_oneOf_matches_none  s2    ""B%7I"J<	
r2   c                	X    V P                  / R RR./R7      pV P                  VR4       R# )r  Tr   z${} is valid under each of True, TrueNr   r   s   & r   test_oneOf_matches_too_many7TestValidationErrorMessages.test_oneOf_matches_too_many  s1    ""B$7N"O"HIr2   c                	`    R RRR/pV P                  RR.VR7      pV P                  VR4       R# )	r   r   unevaluatedItemsFr   r   r   z@Unevaluated items are not allowed ('foo', 'bar' were unexpected)Nr  r   s   &  r   test_unevaluated_items2TestValidationErrorMessages.test_unevaluated_items  s<    '#5u=""UEN6"JN	
r2   c                	\    R RRR/pV P                  RVR7      pV P                  VR4       R# )r   r   r  Fr   r   z'foo' is not of type 'array'Nr   r   s   &  r   &test_unevaluated_items_on_invalid_typeBTestValidationErrorMessages.test_unevaluated_items_on_invalid_type  s7    '#5u=""E&"A"@Ar2   c                	t    R RRR//RR^//pV P                  RRRRR^/VR7      pV P                  VR	4       R
# )
propertiesr   r   r   unevaluatedPropertiesr   r   r  r   z_Unevaluated properties are not valid under the given schema ('bar' was unevaluated and invalid)Nr   r   s   &  r   5test_unevaluated_properties_invalid_against_subschemaQTestValidationErrorMessages.test_unevaluated_properties_invalid_against_subschema  si    568"45#gr]
 ""uur
  # 
 	2	
r2   c                	d    R RRR/pV P                  RRRR/VR7      pV P                  VR4       R# )	r   r   r  Fr   r   r   zEUnevaluated properties are not allowed ('bar', 'foo' were unexpected)Nr   r   s   &  r   &test_unevaluated_properties_disallowedBTestValidationErrorMessages.test_unevaluated_properties_disallowed  sR    ($;UC""uu  # 
 	-	
r2   c                	\    R RRR/pV P                  RVR7      pV P                  VR4       R# )r   r   r  Fr   r   z'foo' is not of type 'object'Nr   r   s   &  r   +test_unevaluated_properties_on_invalid_typeGTestValidationErrorMessages.test_unevaluated_properties_on_invalid_type  s7    ($;UC""E&"A"ABr2   c                	b    R / .RR/pV P                  . ROVR7      pV P                  VR4       R# )rw  r  Fr   z9Expected at most 1 item but found 2 extra: ['bar', 'baz']Nr  r   r   s   &  r   test_single_item,TestValidationErrorMessages.test_single_item  sC    "w6""* # 
 	G	
r2   c                	    R / .RR/pV P                  . ROV\        P                  R7      pV P                  VR4       R# )r  r  Fr   z<Additional items are not allowed ('bar', 37 were unexpected)Nr   r   %   r  r   s   &  r   -test_heterogeneous_additionalItems_with_ItemsITestValidationErrorMessages.test_heterogeneous_additionalItems_with_Items  sM    B4!2E:""'** # 

 	J	
r2   c                	b    R / .RR/pV P                  . ROVR7      pV P                  VR4       R# )rw  r  Fr   z6Expected at most 1 item but found 2 extra: ['bar', 37]Nr  r   r   s   &  r   $test_heterogeneous_items_prefixItems@TestValidationErrorMessages.test_heterogeneous_items_prefixItems   sC    "w6""' # 
 	D	
r2   c                	b    R / .RR/pV P                  . ROVR7      pV P                  VR4       R# )rw  r  Fr   z=Unevaluated items are not allowed ('bar', 37 were unexpected)Nr  r   r   s   &  r   /test_heterogeneous_unevaluatedItems_prefixItemsKTestValidationErrorMessages.test_heterogeneous_unevaluatedItems_prefixItems  sD    "'95A""' # 
 	K	
r2   c                l    RR/ /RR/pV P                  R/ RR^%^/VR7      pV P                  VR4       R	# )
;
Not valid deserialized JSON, but this should not blow up.
r  r   r  Fre   r  r   z?Additional properties are not allowed (37, 'a' were unexpected)Nr   r   s   &  r   2test_heterogeneous_properties_additionalPropertiesNTestValidationErrorMessages.test_heterogeneous_properties_additionalProperties  sU     -CUK""ReR4 # 
 	M	
r2   c                l    RR/ /RR/pV P                  R/ RR^%^/VR7      pV P                  VR4       R	# )
r  r  r   r  Fre   r  r   z@Unevaluated properties are not allowed (37, 'a' were unexpected)Nr   r   s   &  r   3test_heterogeneous_properties_unevaluatedPropertiesOTestValidationErrorMessages.test_heterogeneous_properties_unevaluatedProperties$  sU     -DeL""ReR4 # 
 	N	
r2   r   N)?r[   r   r\   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r!  r%  r(  r-  r:  r@  rC  rG  rK  rO  rR  rU  rY  r^  ra  rd  rh  rn  rq  rt  rx  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r2   r   r   r   2  s5   !??I
<EHD

DD5<9	32

+
<M>5;<G57<CH
<D

A
	





BD
J
B

&
C
	


	
	


r2   r   c                      ] tR tRtR tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tR tRtR# )TestValidationErrorDetailsi3  c                	   ^pRR^/RR/./p\         P                  ! V4      p\        VP                  V4      4      pV P	                  \        V4      ^4       V^ ,          pV P	                  VP                  R4       V P	                  VP                  VR,          4       V P	                  VP                  V4       V P	                  VP                  V4       V P                  VP                  4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                   R4       V P	                  VP"                  \        R.4      4       V P	                  VP$                  \        R.4      4       V P	                  VP&                  \        R.4      4       V P	                  \        VP(                  4      ^4       \+        VP(                  4      w  rgV P	                  VP                  R4       V P	                  VP                  VR,          ^ ,          R,          4       V P	                  VP                  V4       V P	                  VP                  VR,          ^ ,          4       V P-                  VP                  V4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                   R4       V P	                  VP"                  \        ^ R.4      4       V P	                  VP$                  \        ^ R.4      4       V P	                  VP&                  \        . RO4      4       V P/                  VP(                  4       V P	                  VP                  R4       V P	                  VP                  VR,          ^,          R,          4       V P	                  VP                  V4       V P	                  VP                  VR,          ^,          4       V P-                  VP                  V4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                   R4       V P	                  VP"                  \        ^R.4      4       V P	                  VP$                  \        ^R.4      4       V P	                  VP&                  \        . RO4      4       V P	                  \        VP(                  4      ^ 4       R# )	r|  anyOfr   r   r   $N)r  r   r   )r  r   r   )r   r   r@   rA   r(   rI   r   rG   r   r   assertIsNoneparentpathr   relative_pathabsolute_path	json_pathrH   relative_schema_pathabsolute_schema_pathcontextsorted_errorsassertIsassertFalser/   r   r   r   r   ee1e2s   &       r   
test_anyOf%TestValidationErrorDetails.test_anyOf6  s?   B"
 ..v6	i++H56Va(1Ig.**F7O<X.6*!((#r+%)4%)4c*wi(89//y1AB//y1ABQYY+qyy)y1++VG_Q-?	-JKh/F7OA$67bii#%),))595))595s+9~)>?00%I2GH##U+B%C	
 	$v.++VG_Q-?-GHh/F7OA$67bii#%),))595))595s+6{);<00%F2DE00%8L2MNRZZ!,r2   c                	^   R ^/pRRR/RRRR R^.///./p\         P                  ! V4      p\        VP                  V4      4      pV P	                  \        V4      ^4       V^ ,          pV P	                  VP                  R4       V P	                  VP                  VR,          4       V P	                  VP                  V4       V P	                  VP                  V4       V P                  VP                  4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                   R4       V P	                  VP"                  \        R.4      4       V P	                  VP$                  \        R.4      4       V P	                  VP&                  \        R.4      4       V P	                  \        VP(                  4      ^4       \+        VP(                  4      w  rgV P	                  VP                  R4       V P	                  VP                  VR,          ^ ,          R,          4       V P	                  VP                  V4       V P	                  VP                  VR,          ^ ,          4       V P-                  VP                  V4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                  \        . 4      4       V P	                  VP                   R4       V P	                  VP"                  \        ^ R.4      4       V P	                  VP$                  \        ^ R.4      4       V P	                  VP&                  \        . R	O4      4       V P/                  VP(                  4       V P	                  VP                  R4       V P	                  VP                  ^.4       V P	                  VP                  ^4       V P	                  VP                  R^./4       V P-                  VP                  V4       V P	                  VP                  \        R .4      4       V P	                  VP                  \        R .4      4       V P	                  VP                  \        R .4      4       V P	                  VP                   R4       V P	                  VP"                  \        . R
O4      4       V P	                  VP$                  \        . R
O4      4       V P	                  VP&                  \        . RO4      4       V P/                  VP(                  4       R# )r   r   r   r   r  enumr  $.fooN)r   r   r   )r   r  r   r  )r   r   r  r   r  )r   r   r@   rA   r(   rI   r   rG   r   r   r  r  r  r   r  r  r  rH   r  r  r  r  r  r  r  s   &       r   	test_type$TestValidationErrorDetails.test_type{  sI   1:#H 56A3-"8
 ..v6	i++H56Va(1If-**F6N;X.6*!((#r+%)4%)4c*vh8//xA//xAQYY+qyy)v.++VF^A->v-FGh/F6N1$56bii#%),))595))595s+6{);<00%F2DE00%8K2LM$v.++aS1a(VaSM2bii#%.1))5%>:))5%>:w/NNE"BC	
 	##U+K%L	
 	##:;	

 	$r2   c                	   R ^R^.R^RR/pRR RR/RR^/RR	^
R
. RO///p\         P                  ! V4      pVP                  V4      p\        V4      w  rVrxV P	                  VP
                  \        R.4      4       V P	                  VP
                  \        R.4      4       V P	                  VP
                  \        R.4      4       V P	                  VP
                  \        R .4      4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        R .4      4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        R .4      4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R
4       V P	                  VP                  R	4       V P	                  VP                  R4       R# )r   r   r  quuxspamr  r   r   rJ  r   r  $.barz$.bazr  N)r           )r   r   rA   r  r(   r  r   r  r  r  r   )	r/   r   r   r   r   r  r  e3e4s	   &        r   test_single_nesting.TestValidationErrorDetails.test_single_nesting  sb   1eaS%VVD)
A	2v|<
 ..v6	&&x0&v.%.1%.1%.1%.1))5%>:))5%>:))5%>:))5%>:))5%>:))5%>:))5%>:))5%>:w/w/w/w/z2v.y1v.r2   c                	
   ^R^RR^.//R.pRRRRRR.R	RR
^^./RRRR	RRR/RR^//////p\         P                  ! V4      pVP                  V4      p\        V4      w  rVrxrV P	                  VP
                  \        . 4      4       V P	                  VP
                  \        ^ .4      4       V P	                  VP
                  \        ^R.4      4       V P	                  VP
                  \        . RO4      4       V P	                  V	P
                  \        . RO4      4       V P	                  V
P
                  \        ^R.4      4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  V	P                  R4       V P	                  V
P                  R4       V P	                  VP                  \        R.4      4       V P	                  VP                  \        RR.4      4       V P	                  \        VP                  4      . RO4       V P	                  \        VP                  4      . RO4       V P	                  \        V	P                  4      . RO4       V P	                  \        V
P                  4      . RO4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  V	P                  R4       V P	                  V
P                  R
4       R# )r   r   r   r  r  r   r   r  r   r  r  r   r  TrJ  r  $[0]z$[1].barz$[1].bar.barz$[1].bar.bazz$[1].fooN)r   r   r   )r   r   r  )r  r  r   r   )r  r  r   r  r   r  )r  r  r   r  r  rJ  )r  r  r   r  )r   r   rA   r  r(   r  r   r  rH   r@   r   )r/   r   r   r   r   r  r  r  r  e5e6s   &          r   test_multiple_nesting0TestValidationErrorDetails.test_multiple_nesting  s   q%%!6?H8,FQF+$!J#5!J?'	
" ..v6	&&x0!.v!6%),%*-%E
"34%(9":;%(9":;%E
"34s+v.z2~6~6z2x9/@)AB "H	
 	 K	
 	 K	
 	 "H	
 	v.v.v.z2z2v.r2   c                	   R RRRRRRR.RRRR	/RRRR
RRR/////.//RRRR.RRRR///pRRRRRRRRRRR//////p\         P                  ! V4      pVP                  V4      w  pV P                  VP                  \        R.4      4       V P                  VP                  \        . RO4      4       V P                  VP                  R4       VP                  w  pV P                  VP                  \        . RO4      4       V P                  VP                  \        . RO4      4       V P                  VP                  R4       VP                  w  pV P                  VP                  \        . RO4      4       V P                  VP                  \        . RO4      4       V P                  VP                  R4       R# )definitionsnoder  r   r   r  r   childrenr  r   r=  ^.*$r   z#/definitions/noderootre   abz$.rootz$.root.children.az$.root.children.a.children.abN)r  r	  r  )r	  r  re   )	r  r	  r  r   r  r  r=  r  r  )r	  r  re   r  r
  )r  r	  r  r   r  r  r=  r  r  r   r  r  r=  r  r  )	r   r   rA   r(   r  r   r  r  r  )r/   r   r   r   r  r  r  s   &      r   test_recursive)TestValidationErrorDetails.test_recursive,  s	   "VZ$8$" &% ' & 3$*(.0D-&6")	' * H6F,@#AB1
8 "  &#%

  ..v6	""8,%/:""E*I$J	
 	h/ii))51J+KL##U
&	
 	':;jje;	

 	##U&	
* 	'FGr2   c                	   R R R^/pRRRR^//p\         P                  ! V4      pVP                  V4      p\        V4      w  rVV P	                  VP
                  \        R .4      4       V P	                  VP
                  \        R.4      4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       R# )	r   r   r  r   r   r   r  r  N	r   r   rA   r  r(   r  r   r  r   r/   r   r   r   r   r  r  s   &      r   test_additionalProperties4TestValidationErrorDetails.test_additionalProperties  s    5%+(69i*KL..v6	&&x0v&%.1%.1w/w/v.y1r2   c                	
   R ^R^/pRR RR/RR^///p\         P                  ! V4      pVP                  V4      p\        V4      w  rVV P	                  VP
                  \        R .4      4       V P	                  VP
                  \        R.4      4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       R# )	r   r   r=  r   r   r   r  r  Nr  r  s   &      r   test_patternProperties1TestValidationErrorDetails.test_patternProperties  s    1eQ')	1~"
 ..v6	&&x0v&%.1%.1w/w/v.y1r2   c                	   R ^.pR. RRRR^//p\         P                  ! V4      pVP                  V4      p\        V4      w  rVV P	                  VP
                  \        ^ .4      4       V P	                  VP
                  \        ^.4      4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       R# )	r   r  r  r   r   r   r  $[1]Nr  r  s   &      r   test_additionalItems/TestValidationErrorDetails.test_additionalItems  s    1:R	9a@

 ..v6	&&x0v&%*-%*-v.v.v.y1r2   c                	   . R	OpR/ .RRRR^//p\         P                  ! V4      pVP                  V4      p\        V4      w  rVV P	                  VP
                  \        ^.4      4       V P	                  VP
                  \        ^.4      4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P	                  VP                  R4       R# )
r   r  r  r   r   r   r  z$[2]N)r   r   r   r  r  s   &      r   test_additionalItems_with_items:TestValidationErrorDetails.test_additionalItems_with_items  s    $bT	9a@

 ..v6	&&x0v&%*-%*-v.v.v.y1r2   c                	   R ^/pRRRR ///p\         P                  ! V4      pVP                  V4      w  pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  \        . 4      4       V P                  VP                  R4       V P                  VP                  \        RR.4      4       R# )r   propertyNamesr   r   z0'foo' should not be valid under {'const': 'foo'}r  N
r   r  rA   r(   r   r   r  r   r  rH   )r/   r   r   r   errors   &    r   test_propertyNames-TestValidationErrorDetails.test_propertyNames  s    2;!EGU+;#<=..v6	&&x0%0MM>	
 	U2Y/#.**E?E2J,KLr2   c                	   R R^/RR^//p\         P                  ! V4      pVP                  ^4      w  pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  \        . 4      4       V P                  VP                  R4       V P                  VP                  \        RR.4      4       R# )ifr   then13 was expectedr  Nr  r/   r   r   r  s   &   r   test_if_then'TestValidationErrorDetails.test_if_then      7B-WbM

 ..v6	&&r*'2(9:U2Y/#.**E672C,DEr2   c                	   R R^/RR^//p\         P                  ! V4      pVP                  ^4      w  pV P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  \        . 4      4       V P                  VP                  R4       V P                  VP                  \        RR.4      4       R# )r#  r   elser%  r  Nr  r&  s   &   r   test_if_else'TestValidationErrorDetails.test_if_else  r)  r2   c                	6   \         P                  ! R 4      pVP                  ^4      w  pV P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  3RRR^R \        . 4      R34       R# )FzFalse schema does not allow 12Nr  )r   r  rA   r(   r   r   rG   r   r   rH   r  r   )r/   r   r  s   &  r   test_boolean_schema_False4TestValidationErrorDetails.test_boolean_schema_False  s    ..u5	&&r*%%!! 1b		
r2   c                	   R RRR//r!\         P                  ! RV/\         P                  ! R/ W/R7      R7      pVP                  RR	/4      w  pV P	                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  3R
RRR	\        R.4      RR/\        RR.4      R34       R# )someRefr  r   r   r   rz   storeresolverr   notAnIntegerz''notAnInteger' is not of type 'integer'r  N)r   r  _RefResolverrA   r(   r   r   rG   r   r  r   rH   r  r   )r/   refr   r   r  s   &    r   test_ref#TestValidationErrorDetails.test_ref'  s    "869:M!NV..SM,,RC=I
	 &&~'>?%%##!!	 :ug#-v67		
r2   c                	   R RR// / R^/./p\         P                  ! V4      pVP                  . R	O4      w  r4V P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RRR^\        ^ .4      RR/\        . R
O4      R34       V P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RR^^\        ^.4      R^/\        . RO4      R34       R# )rw  r   r   r   r   r  z"5 is greater than the maximum of 3$[3]Nr{  )rw  r   r   )rw  r  r   r   r   rA   r(   r   r   rG   r   r  r   rH   r  r   )r/   r   r   
type_error	min_errors   &    r   test_prefixItems+TestValidationErrorDetails.test_prefixItemsF  sY   68"4b"y!n!MN33F;	 ) 5 56F G
""$$**##((!!&&$$	 ,qc
"01		
, 	!!##))""''  %%##	 5qc
A34		
r2   c                	   R RR/R/ ./p\         P                  ! V4      pVP                  . R	O4      w  r4V P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RRR^\        ^.4      RR/\        R R.4      R34       V P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RRR^\        ^.4      RR/\        R R.4      R34       R# )
r  r   r   rw  z2 is not of type 'string'r  z4 is not of type 'string'r=  N)r   r  r   r  r  r>  r/   r   r   r  r  s   &    r   rx  6TestValidationErrorDetails.test_prefixItems_with_itemsw  sG   fh'B4
 33F;	&&'BC

""  			 ,qc
"w'(		
, 	

""  			 ,qc
"w'(		
r2   c                   RRR/R^/p\         P                  ! V4      pVP                  . RO4      w  pV P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RR^. RO\        . 4      RRR/R^/\        R.4      R34       R# )	zp
`contains` + `maxContains` produces only one error, even if there are
many more incorrectly matching elements.
r+  r   r   r  r  r  N)r   r  r   r  r  r  r>  r&  s   &   r   r  1TestValidationErrorDetails.test_contains_too_many  s    
 vx0-C33F;	&&'JK%%##!!	 M3b	fh/Bzl#		
r2   c                	   R RR/R^/p\         P                  ! V4      pVP                  . RO4      w  pV P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RR^. RO\        . 4      R RR/R^/\        R .4      R34       R# )r+  r   r   r  r  r  N)r   r  r  r>  r&  s   &   r   r  0TestValidationErrorDetails.test_contains_too_few  s    vx0-C33F;	&&}5%%##!!	? b	fh/Bzl#	
r2   c                	   R RR/R^/p\         P                  ! V4      pVP                  ^^.4      w  pV P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  3RR RR/^^.\        . 4      R RR/R^/\        R .4      R34       R# )r+  r   r   r  z7[2, 4] does not contain items matching the given schemar  Nr>  r&  s   &   r   test_contains_none-TestValidationErrorDetails.test_contains_none  s    vx0-C33F;	&&1v.%%##!!	 J"Ab	fh/Bzl#		
r2   c                	   R RRR.//RRRRRR.///p\         P                  ! V4      pVP                  R/ /4      w  r4V P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  3	R	RR./ \        R.4      RR./\        . RO4      \        . RO4      R
3	4       V P                  VP                  VP
                  VP                  VP                  VP                  VP                  VP                  VP                  VP                  3	RRR./ \        R.4      RRRR./\        . RO4      \        . RO4      R
3	4       R# )r   r   r  r   r  apropr   z#/$defs/foor  z'bar' is a required propertyz$.apropz'baz' is a required propertyN)r  rN  r  )r   r   rA   r(   r   r   rG   r   r  r   rH   r  r  r   rD  s   &    r   test_ref_sibling+TestValidationErrorDetails.test_ref_sibling  s   ej5'23M
 33F;	&&}5

""  		''
 /wi eW%9:9:
	
0 	

""  		''
 /wi 
UG<9:9:
	
r2   r   N)r[   r   r\   r   r  r  r  r  r  r  r  r  r  r   r'  r,  r/  r:  rA  rx  r  r  rK  rO  r   r   r2   r   r  r  3  st    C-JK%Z%/N;/zcHJ2"2,2(2(M FF
2
>/
b2
h
>
<
6<
r2   r  c                  :    ] tR tRtR tR tR tR tR tR t	Rt
R	# )
MetaSchemaTestsMixiniB  c                	    V P                  \        P                  4      ;_uu_ 4        V P                  P	                  R ^/4       RRR4       R#   + '       g   i     R# ; i)r  Nr   r   r   r-   r   r.   s   &r   test_invalid_properties,MetaSchemaTestsMixin.test_invalid_propertiesD  s?    z5566NN''r(:; 7666   AA!	c                	    V P                  \        P                  4      ;_uu_ 4        V P                  P	                  R R/4       RRR4       R#   + '       g   i     R# ; i)rJ  1NrT  r.   s   &r   test_minItems_invalid_string1MetaSchemaTestsMixin.test_minItems_invalid_stringH  s?    z5566NN''S(9: 7666rW  c                d   V P                   \        P                  \        P                  09   dP   V P	                  \
        P                  4      ;_uu_ 4        V P                   P                  R. /4       RRR4       R# V P                   P                  R. /4       R#   + '       g   i     R# ; i)z
Technically, all the spec says is they SHOULD have elements, not MUST.

(As of Draft 6. Previous drafts do say MUST).

See #529.
r  Nr-   r   r   r   r   r   r   r   r.   s   &r   test_enum_allows_empty_arrays2MetaSchemaTestsMixin.test_enum_allows_empty_arraysM  s     >>&&&&
 
 "":#9#9::++VRL9 ;: NN''5 ;::s   BB/	c                l   V P                   \        P                  \        P                  09   dR   V P	                  \
        P                  4      ;_uu_ 4        V P                   P                  R^^./4       RRR4       R# V P                   P                  R^^./4       R#   + '       g   i     R# ; i)z~
Technically, all the spec says is they SHOULD be unique, not MUST.

(As of Draft 6. Previous drafts do say MUST).

See #529.
r  Nr]  r.   s   &r   !test_enum_allows_non_unique_items6MetaSchemaTestsMixin.test_enum_allows_non_unique_items^  s     >>&&&&
 
 "":#9#9::++Vb"X,>? ;: NN''"b(:; ;::s    B""B3	c                	    V P                  \        P                  4      ;_uu_ 4        V P                  P	                  R R/4       RRR4       R#   + '       g   i     R# ; i)r  
*notaregexNrT  r.   s   &r   test_schema_with_invalid_regex3MetaSchemaTestsMixin.test_schema_with_invalid_regexo  s?    z5566NN''L(AB 7666rW  c                	D    V P                   P                  R R/RR7       R# )r  rd  Nr7  )r-   r   r.   s   &r   >test_schema_with_invalid_regex_with_disabled_format_validationSMetaSchemaTestsMixin.test_schema_with_invalid_regex_with_disabled_format_validations  s$    ##% 	$ 	
r2   r   N)r[   r   r\   r   rU  rZ  r^  ra  re  ri  r   r   r2   r   rR  rR  B  s!    <;
6"<"C
r2   rR  c                      ] tR tRtR tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tR tR tRtR# )ValidatorTestMixiniz  c                	d    V P                  V P                  / 4      \        P                  4       R # r4   )assertIsInstancer-   r   r.   s   &r   )test_it_implements_the_validator_protocol<ValidatorTestMixin.test_it_implements_the_validator_protocol{  s!    dnnR0)2E2EFr2   c                	    V P                   w  rV P                  V P                  V4      P                  V4      4       R # r4   )validr   r-   r   r/   r   r   s   &  r   test_valid_instances_are_valid1ValidatorTestMixin.test_valid_instances_are_valid~  s.    ::v.77ABr2   c                	    V P                   w  rV P                  V P                  V4      P                  V4      4       R # r4   )invalidr  r-   r   rs  s   &  r   $test_invalid_instances_are_not_valid7ValidatorTestMixin.test_invalid_instances_are_not_valid  s0    <</88BCr2   c                	|    V P                  \        4       \        4       /4      P                  \        4       R 7       R# ))r   N)r-   r   r   r.   s   &r   (test_non_existent_properties_are_ignored;ValidatorTestMixin.test_non_existent_properties_are_ignored  s'    &(+,55vx5Hr2   c                	D   R R/\        4       r!V P                  VVR7      pVP                  R R/V P                  P                  R7      pV P                  R R/V P                  P                  VP                  R7      pV P                  WE4       V P                  WC4       R# )r   r   rh  r   )r   r7  )r7  	_resolverN)r   r-   evolveFORMAT_CHECKERr~  r(   assertNotEqual)r/   r   r7  rs   r   expecteds   &     r   test_evolveValidatorTestMixin.test_evolve  s    "()!4mo>>) " 
 ooH%>>88  

 >>X>>88mm " 
 	'C*r2   c                   V P                  \        4      ;_uu_ 4        \         ! R RV P                  4      4       pRRR4       X! / ^R7      pV P	                  VP
                  . RO4       VP                  RR/R7      pV P	                  VP
                  . RO4       V P	                  VP                  ^4       R#   + '       g   i     L; i)	aB  
Subclassing validators isn't supported public API, but some users have
done it, because we don't actually error entirely when it's done :/

We need to deprecate doing so first to help as many of these users
ensure they can move to supported APIs, but this test ensures that in
the interim, we haven't broken those users.
c                  <    ] tR tRt]! R R7      t]! ^%R7      tRtR# ):ValidatorTestMixin.test_evolve_with_subclass.<locals>.OhNoi  c                 	
    . RO# )r   r  r   r   r2   r   r   CValidatorTestMixin.test_evolve_with_subclass.<locals>.OhNo.<lambda>  s    Ir2   )factorydefaultr   N)r[   r   r\   r   r   r   _barr   r   r2   r   OhNor    s    $56R(r2   r  N)r   r   r   r   r  )assertWarnsDeprecationWarningr   r-   r(   r   r  r  )r/   r  r   r   s   &   r   test_evolve_with_subclass,ValidatorTestMixin.test_evolve_with_subclass  s     011)t~~ ) ) 2 $		2vy&9:),2& 21s   B==C	c                	f    V P                  V P                  / 4      P                  R R4      4       R# )r   r   N)r   r-   r   r.   s   &r   #test_is_type_is_true_for_valid_type6ValidatorTestMixin.test_is_type_is_true_for_valid_type  s$    r*225(CDr2   c                	f    V P                  V P                  / 4      P                  R R4      4       R# )r   r   Nr  r-   r   r.   s   &r   &test_is_type_is_false_for_invalid_type9ValidatorTestMixin.test_is_type_is_false_for_invalid_type  s&    +33E7CDr2   c                	    V P                  V P                  / 4      P                  R R4      4       V P                  V P                  / 4      P                  R R4      4       R# )Tr   r   Nr  r.   s   &r   ,test_is_type_evades_bool_inheriting_from_int?ValidatorTestMixin.test_is_type_evades_bool_inheriting_from_int  sJ    +33D)DE+33D(CDr2   c                	   R RR//p\         P                  ! V P                  V P                  P                  P	                  RR 4      R7      pV! V4      pVP                  ^R\        ^4      \        ^4      ,          .4       R/ . RR.pT P                  VP                  V4       Uu. uF  qUP                  NK  	  upV4       R# u upi )	r  r   r   c                r    \        V\        \        \        34      ;'       d    \        V\        4      '       * # r4   )
isinstanceintfloatr   boolr9  r1  s   &&r   r   GValidatorTestMixin.test_it_can_validate_with_decimals.<locals>.<lambda>  s1    zC0( (2 (2$UD11(2r2   r&   g?r   TN)
r   r   r-   r7   redefiner   r   r(   rA   r   )r/   r   r-   r   rw  r  s   &     r   "test_it_can_validate_with_decimals5ValidatorTestMixin.test_it_can_validate_with_decimals  s    FH-.%%NN44==2
	 f%	AsGAJ$;<="b$-)2)>)>w)GH)G^^)GH	
Hs   (Cc                	b    V P                  R R/\        4       R7      pVP                  R4       R# )r5  carrotrh  bugsN)r-   r   r   r/   r   s   & r   7test_it_returns_true_for_formats_it_does_not_know_aboutJValidatorTestMixin.test_it_returns_true_for_formats_it_does_not_know_about  s1    NNx  # 
	 	6"r2   c                	^    V P                  / 4      pV P                  VP                  4       R # r4   )r-   r  r7  r  s   & r   ,test_it_does_not_validate_formats_by_default?ValidatorTestMixin.test_it_does_not_validate_formats_by_default  s$    NN2&	)223r2   c                	  a a \        4       p\        R 4      oVP                  R\        R7      VV 3R l4       pS P                  RR/VR7      pVP	                  R4       S P                  \        P                  4      ;_uu_ 4       pVP	                  R4       RRR4       S P                  XP                  P                  S4       R#   + '       g   i     L8; i)	zBad!r   )raisesc                V   < V R 8X  d   R# V R8X  d   ShSP                  RV  R24       R# )goodTbadzWhat is z? [Baby Don't Hurt Me]N)r    )r3  r  r/   s   &r   checkTValidatorTestMixin.test_it_validates_formats_if_a_checker_is_provided.<locals>.check  s/    %			HUG+ABCr2   r5  rh  r  r  N)r   
ValueErrorr8  r-   r   r   r   r   r  	exceptioncause)r/   r9  r  r   cmr  s   f    @r   2test_it_validates_formats_if_a_checker_is_providedEValidatorTestMixin.test_it_validates_formats_if_a_checker_is_provided  s    / 	j	1	D 
2	D NNug # 
	 	6"z99::bu% ; 	bll((#.	 ;:s   CC	c                	    \        4       pR V./p\        P                  ! V P                  V P                  P                  P                  VR 4      R7      pV! V4      P                  ^4       R# )r   c                "    \        V\        4      # r4   r  r  r  s   &&r   r   @ValidatorTestMixin.test_non_string_custom_type.<locals>.<lambda>  s    z%'=r2   r  N)r   r   r   r-   r7   r  r   )r/   non_string_typer   Crazys   &   r   test_non_string_custom_type.ValidatorTestMixin.test_non_string_custom_type  s_     (?+,!!NN44===
 	fr"r2   c                   \         P                  ! V P                  V P                  P                  P	                  RR 4      R7      pV P                  \        P                  4      ;_uu_ 4       pV! RR/4      P                  R4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)	zP
A tuple instance properly formats validation errors for uniqueItems.

See #224
r   c                "    \        V\        4      # r4   )r  tupler  s   &&r   r   NValidatorTestMixin.test_it_properly_formats_tuples_in_errors.<locals>.<lambda>  s    z%'?r2   r  uniqueItemsTNz(1, 1) has non-unique elements)r   r   )r   r   r-   r7   r  r   r   r   r   r   strr  )r/   TupleValidatorr  s   &  r   )test_it_properly_formats_tuples_in_errors<ValidatorTestMixin.test_it_properly_formats_tuples_in_errors  s     $**NN44==?
 z99::aM401::6B ;6AKK8HI ;:s   /B88C	c                  a RRRR/p\        RR4      o\        P                  ! V P                  V P                  P                  P                  RR RV3R	 l/4      R
7      pV! V4      p\        . RO4      \        R.^ ..4      \        R.4      \        ^ .4      .\        R.4      .\        ^ .4      ..\        R.4      ....\        ^ .4      .....\        \        R.4      .4      \        \        ^ .4      .4      .S! R^ 4      S! RR4      .S! R\        ^ .4      .4      S! R\        R.4      .4      .S! RS! R\        ^ .4      4      .4      S! RS! R\        R.4      4      .4      .\        \        \        R.4      4      4      \        \        \        ^ .4      4      4      ..
pV F  pVP                  V4       K  	  \        . RO4      \        R.R..4      \        R.4      \        R.4      .\        R.4      .\        R.4      ..\        R.4      ....\        R.4      .....\        \        R.4      .4      \        \        R.4      .4      .S! RR4      S! RR4      .S! R\        R.4      .4      S! R\        R.4      .4      .S! RS! R\        R.4      4      .4      S! RS! R\        R.4      4      .4      .\        \        \        R.4      4      4      \        \        \        R.4      4      4      ..
pV FD  pV P                  \        P                  4      ;_uu_ 4        VP                  V4       RRR4       KF  	  R#   + '       g   i     K[  ; i)z?
Allow array to validate against another defined sequence type
r   r   r  T	MyMappingza, bc                .    \        V\        \        34      # r4   )r  r@   r   r  s   &&r   r   BValidatorTestMixin.test_check_redefined_sequence.<locals>.<lambda>  s    Je}5r2   r   c                (   < \        V\        S34      # r4   )r  r*   )r9  r1  r  s   &&r   r   r    s    Zi06r2   r  re   NF)re   NrY  rz   T)re   rk  re   )r   r   r   r-   r7   redefine_manyr   r   r   r   r   )r/   r   r-   r   valid_instancesr   invalid_instancesr  s   &      @r   test_check_redefined_sequence0ValidatorTestMixin.test_check_redefined_sequence  sV    '=$7{F3	%%NN44BB   		
	 f%	 ,-E7QC.!E7^UA3Z(UGnqc
|,w !"#s~&6%78E5'N#$eUA3ZL&9:sA	#u 56#qc
|,#ug/0
 #	#uaSz :;<#	#ueW~ >?@ 5w()5uaSz1B+CD!
& (Hx( ( /"E7UG$%E7^UE7^,UGnug/0w !"#w(8'9&:%;<E5'N#$eUE7^,<&=>sE"Ic5$9:#ug/0#ug/0
 #	#ueW~ >?@#	#ueW~ >?@ 5w()5ueW~1F+GH!
& *H"":#=#=>>""8, ?> *>>>s   ,MMc                	    V P                  \        4      ;_uu_ 4        V P                  / 4      P                  pR R R 4       V P	                  X\
        P                  4       R #   + '       g   i     L2; ir4   )r  r  r-   r6  rn  r   r8  )r/   r6  s   & r   .test_it_creates_a_ref_resolver_if_not_providedAValidatorTestMixin.test_it_creates_a_ref_resolver_if_not_providedT  sL    011~~b)22H 2h
(?(?@ 21s   A$$A4	c                	   R RR/r!\         P                  ! R/ W/R7      pV P                  RV/VR7      pV P                  \        P
                  4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)someCoolRefr   r   rz   r3  r   r5  N)r   r8  r-   r   r   r   r   r/   r9  r   r6  r   s   &    r   /test_it_upconverts_from_deprecated_RefResolversBValidatorTestMixin.test_it_upconverts_from_deprecated_RefResolversY  sn    #fi%8V**2r#GNNFC=8ND	z99::t$ ;:::s   A88B		c                  a   ! V 3R lR4      pV! 4       pRR/pS P                  \        P                  4      ;_uu_ 4        S P                  W2R7      P	                  R4       RRR4       R#   + '       g   i     R# ; i)zJ
Legacy RefResolvers support only the context manager form of
resolution.
c                  .   < ] tR tRt]V 3R l4       tRtR# )nValidatorTestMixin.test_it_upconverts_from_yet_older_deprecated_legacy_RefResolvers.<locals>.LegacyRefResolverig  c              3  	@   <"   SP                  VR 4       RR/x  R# 5i)the refr   r   Nr(   )thisr9  r/   s   &&r   	resolvingxValidatorTestMixin.test_it_upconverts_from_yet_older_deprecated_legacy_RefResolvers.<locals>.LegacyRefResolver.resolvingh  s!       i0y))s   r   N)r[   r   r\   r   r   r  r   r.   s   r   LegacyRefResolverr  g  s    * *r2   r  r   r  r5  N)r   r   r   r-   r   )r/   r  r6  r   s   f   r   @test_it_upconverts_from_yet_older_deprecated_legacy_RefResolversSValidatorTestMixin.test_it_upconverts_from_yet_older_deprecated_legacy_RefResolversa  s`    	* 	* %&)$z99::NN6N5>>tD ;:::s   "A--A>	r   N)r[   r   r\   r   ro  rt  rx  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r2   r   rl  rl  z  sm    GCDI+('.EEE
*#4/0
#J"@-DA
%Er2   rl  c                  2    ] tR tRtRtR tR tR tR tRt	R# )	AntiDraft6LeakMixinit  zF
Make sure functionality from draft 6 doesn't leak backwards in time.
c                	   V P                  \        P                  4      ;_uu_ 4       pV P                  P	                  R 4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)TNzTrue is not of typer   r   r   r-   r   r   r  r  r/   r  s   & r   test_True_is_not_a_schema-AntiDraft6LeakMixin.test_True_is_not_a_schemay  sS    z5566!NN''- 7+S-=> 76   A33B	c                	   V P                  \        P                  4      ;_uu_ 4       pV P                  P	                  R 4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)FNzFalse is not of typer  r  s   & r   test_False_is_not_a_schema.AntiDraft6LeakMixin.test_False_is_not_a_schema~  sS    z5566!NN''. 7,c!++.>? 76r  c                	   V P                  \        4      ;_uu_ 4       pV P                  R 4      P                  ^4       RRR4       V P	                  XP
                  \        P                  4       R#   + '       g   i     L<; iTNr   	Exceptionr-   r   assertNotIsInstancer  r   r   r  s   & r   5test_True_is_not_a_schema_even_if_you_forget_to_checkIAntiDraft6LeakMixin.test_True_is_not_a_schema_even_if_you_forget_to_check  sT    y))QNN4 ))"- *  j.H.HI *)   !A33B	c                	   V P                  \        4      ;_uu_ 4       pV P                  R 4      P                  ^4       RRR4       V P	                  XP
                  \        P                  4       R#   + '       g   i     L<; iFNr  r  s   & r   6test_False_is_not_a_schema_even_if_you_forget_to_checkJAntiDraft6LeakMixin.test_False_is_not_a_schema_even_if_you_forget_to_check  sT    y))QNN5!**2. *  j.H.HI *)r  r   N)
r[   r   r\   r   __doc__r  r  r  r  r   r   r2   r   r  r  t  s    ?
@
J
Jr2   r  c                  f    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	R t
R tR	 tR
 tRtR# )TestDraft3Validatori  tuple[dict, dict]rr  r   r   r   c                	^    V P                  R R/4      pVP                  \        4       4       R# r   anyN)r-   r   r   r  s   & r   #test_any_type_is_valid_for_type_any7TestDraft3Validator.test_any_type_is_valid_for_type_any  s$    NNFE?3	68$r2   c                t   \         P                  ! V P                  V P                  P                  P	                  RR 4      R7      pV! RR/4      pVP                  ^4       V P                  \        P                  4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)z
Sigh, because why not.
r  c                "    \        V\        4      # r4   r  r  s   &&r   r   BTestDraft3Validator.test_any_type_is_redefinable.<locals>.<lambda>  s    j.Dr2   r  r   r   N)	r   r   r-   r7   r  r   r   r   r   )r/   r  r   s   &  r   test_any_type_is_redefinable0TestDraft3Validator.test_any_type_is_redefinable  s     !!NN44==D
 65/*	2z99::u% ;:::s   
B&&B7	c                	x    V P                  V P                  R R/4      P                  \        4       4      4       R# r  )r   r-   r   r   r.   s   &r   !test_is_type_is_true_for_any_type5TestDraft3Validator.test_is_type_is_true_for_any_type  s(    7@@JKr2   c                	    V P                  V P                  / 4      P                  R R4      4       V P                  V P                  RR/4      P                  R 4      4       R# )Tr   r   r  N)r   r-   r   r   r.   s   &r   6test_is_type_does_not_evade_bool_if_it_is_being_testedJTestDraft3Validator.test_is_type_does_not_evade_bool_if_it_is_being_tested  sH    r*224CD7@@FGr2   r   N)r[   r   r\   r   r   r   r-   rr  __annotations__rw  r  r  r  r  r   r   r2   r   r  r    sA    **I "BxE'y!5(G%&LHr2   r  c                  N    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	Rt
R# )	TestDraft4Validatori  r	  rr  r   r   r   r   N)r[   r   r\   r   r   r   r-   rr  r  rw  r   r   r2   r   r  r    +    **I "BxE'y!5(Gr2   r  c                  N    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	Rt
R# )	TestDraft6Validatori  r	  rr  r   r   r   r   N)r[   r   r\   r   r   r,  r-   rr  r  rw  r   r   r2   r   r  r    r  r2   r  c                  N    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	Rt
R# )	TestDraft7Validatori  r	  rr  r   r   r   r   N)r[   r   r\   r   r   r  r-   rr  r  rw  r   r   r2   r   r!  r!    r  r2   r!  c                  N    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	Rt
R# )	TestDraft201909Validatori  r	  rr  r   r   r   r   N)r[   r   r\   r   r   Draft201909Validatorr-   rr  r  rw  r   r   r2   r   r#  r#    +    //I "BxE'y!5(Gr2   r#  c                  N    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	Rt
R# )	TestDraft202012Validatori  r	  rr  r   r   r   r   N)r[   r   r\   r   r   r   r-   rr  r  rw  r   r   r2   r   r'  r'    r%  r2   r'  c                       ] tR tRtRtR tRtR# )TestLatestValidatori  zI
These really apply to multiple versions but are easiest to test on one.
c                	    R pRV/p\         P                  ! R/ VR/R7      p\         P                  ! W#R7      pV P                  \        P
                  4      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)r  r   rz   Fr3  r5  N)r   r8  r   r   r   r   r   r  s   &    r   2test_ref_resolvers_may_have_boolean_schemas_storedFTestLatestValidator.test_ref_resolvers_may_have_boolean_schemas_stored  sl    #**2r#uF..vI	z99::t$ ;:::s    A<<B	r   N)r[   r   r\   r   r  r+  r   r   r2   r   r)  r)    s    %r2   r)  c                  p    ] tR tRtR tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tRtR# )TestValidatorFori  c                	    R R/pV P                  \        P                  ! V4      \        P                  4       R R/pV P                  \        P                  ! V4      \        P                  4       R# )r   &http://json-schema.org/draft-03/schema'http://json-schema.org/draft-03/schema#N)r  r   validator_forr   r;   s   & r   test_draft_3TestValidatorFor.test_draft_3  `    EF$$V,&&	

 FG$$V,&&	
r2   c                	    R R/pV P                  \        P                  ! V4      \        P                  4       R R/pV P                  \        P                  ! V4      \        P                  4       R# )r   &http://json-schema.org/draft-04/schema'http://json-schema.org/draft-04/schema#N)r  r   r2  r   r;   s   & r   test_draft_4TestValidatorFor.test_draft_4  r5  r2   c                	    R R/pV P                  \        P                  ! V4      \        P                  4       R R/pV P                  \        P                  ! V4      \        P                  4       R# )r   &http://json-schema.org/draft-06/schema'http://json-schema.org/draft-06/schema#N)r  r   r2  r,  r;   s   & r   test_draft_6TestValidatorFor.test_draft_6  r5  r2   c                	    R R/pV P                  \        P                  ! V4      \        P                  4       R R/pV P                  \        P                  ! V4      \        P                  4       R# )r   &http://json-schema.org/draft-07/schema'http://json-schema.org/draft-07/schema#N)r  r   r2  r  r;   s   & r   test_draft_7TestValidatorFor.test_draft_7  r5  r2   c                	    R R/pV P                  \        P                  ! V4      \        P                  4       R R/pV P                  \        P                  ! V4      \        P                  4       R# )r   z,https://json-schema.org/draft/2019-09/schemaz-https://json-schema.org/draft/2019-09/schema#N)r  r   r2  r$  r;   s   & r   test_draft_201909"TestValidatorFor.test_draft_201909  `    KL$$V,++	

 LM$$V,++	
r2   c                	    R R/pV P                  \        P                  ! V4      \        P                  4       R R/pV P                  \        P                  ! V4      \        P                  4       R# )r   ,https://json-schema.org/draft/2020-12/schema-https://json-schema.org/draft/2020-12/schema#N)r  r   r2  r   r;   s   & r   test_draft_202012"TestValidatorFor.test_draft_202012  rH  r2   c                	n    V P                  \        P                  ! R 4      \        P                  4       R# r  r  r   r2  r   r.   s   &r   	test_TrueTestValidatorFor.test_True*  s%    $$T*&&	
r2   c                	n    V P                  \        P                  ! R 4      \        P                  4       R# r  rO  r.   s   &r   
test_FalseTestValidatorFor.test_False0  s%    $$U+&&	
r2   c                	    \         P                  ! R R/RR R7      pRR/pV P                  \         P                  ! V4      V4       R# )rr   rw   12c                &    V P                  R R4      # ry   r{   r}   s   &r   r   8TestValidatorFor.test_custom_validator.<locals>.<lambda>:  r   r2   r   r   Nr   r,   r  r2  r/   r-   r   s   &  r   test_custom_validator&TestValidatorFor.test_custom_validator6  sK    %%/0+
	
 -.$$V,	
r2   c                	    \         P                  ! R R/RR7      pRR/pV P                  \         P                  ! V4      V4       R# )r$   r   13rW   r   NrY  rZ  s   &  r   test_custom_validator_draft6-TestValidatorFor.test_custom_validator_draft6B  sH    %% 12
	 ./$$V,	
r2   c                	n    V P                  \        P                  ! / 4      \        P                  4       R # r4   rO  r.   s   &r   %test_validator_for_jsonschema_default6TestValidatorFor.test_validator_for_jsonschema_defaultM  s!    j..r2J4N4NOr2   c                	V    V P                  \        P                  ! / R R7      R 4       R # )Nr  )r  r   r2  r.   s   &r   !test_validator_for_custom_default2TestValidatorFor.test_validator_for_custom_defaultP  s    j..r4@$Gr2   c                	4   V P                  \        4      ;_uu_ 4       p\        P                  ! R R/R7       RRR4       V P	                  XP
                  \        4       V P	                  \        VP                  4      R4       R#   + '       g   i     LW; i)r   unknownSchemar  NzThe metaschema specified by $schema was not found. Using the latest draft to validate, but this will raise an error in the future.)	r  r  r   r2  r(   filename__file__r  warning)r/   r  s   & r   1test_warns_if_meta_schema_specified_was_not_foundBTestValidatorFor.test_warns_if_meta_schema_specified_was_not_foundS  sk    011R$$Y,HI 2 	h/

O&	
	 21s   BB	c                	    \         P                  ! R R7      ;_uu_ 4       p\         P                  ! R4       \        P                  ! / / R7       RRR4       V P                  X4       R#   + '       g   i     L#; i)Trecordalways)r   r  N)warningscatch_warningssimplefilterr   r2  r  )r/   ws   & r   0test_does_not_warn_if_meta_schema_is_unspecifiedATestValidatorFor.test_does_not_warn_if_meta_schema_is_unspecified_  sQ    $$D11Q!!(+$$B; 2 	 21s   /A**A:	c                	l    R R/\        4       r!V P                  \        P                  ! W4      V4       R# )r   zmailto:foo@example.comN)r   r  r   r2  )r/   r   r  s   &  r   -test_validator_for_custom_default_with_schema>TestValidatorFor.test_validator_for_custom_default_with_schemae  s*    $&>?j..v?Ir2   r   N)r[   r   r\   r   r3  r9  r>  rC  rF  rL  rP  rS  r[  r_  rb  re  rl  rv  ry  r   r   r2   r   r.  r.    sP    









	
PH

Jr2   r.  c                  R    ] tR tRtR tR tR tR tR tR t	R t
R	 tR
 tR tRtR# )TestValidateij  c                	    . p\         P                  P                  VR VP                  4      ;_uu_ 4        \        P
                  ! / V4       RRR4       V P                  W1.4       R#   + '       g   i     L$; i)r   N)r   patchr   appendr   r   r(   )r/   r   r-   results   &&& r   
assertUsesTestValidate.assertUsesk  sT    ZZy.&--HHF+ I* IHs   A**A:	c                	    V P                  R R/\        P                  R7       V P                  R R/\        P                  R7       R# )r   r1  r   r-   r0  N)r  r   r   r.   s   &r   test_draft3_validator_is_chosen,TestValidate.test_draft3_validator_is_chosenq  J    HI 00 	 	

 	GH 00 	 	
r2   c                	    V P                  R R/\        P                  R7       V P                  R R/\        P                  R7       R# )r   r8  r  r7  N)r  r   r   r.   s   &r   test_draft4_validator_is_chosen,TestValidate.test_draft4_validator_is_chosen|  r  r2   c                	    V P                  R R/\        P                  R7       V P                  R R/\        P                  R7       R# )r   r=  r  r<  N)r  r   r,  r.   s   &r   test_draft6_validator_is_chosen,TestValidate.test_draft6_validator_is_chosen  r  r2   c                	    V P                  R R/\        P                  R7       V P                  R R/\        P                  R7       R# )r   rB  r  rA  N)r  r   r  r.   s   &r   test_draft7_validator_is_chosen,TestValidate.test_draft7_validator_is_chosen  r  r2   c                	    V P                  R R/\        P                  R7       V P                  R R/\        P                  R7       R# )r   rK  r  rJ  Nr  r   r   r.   s   &r   $test_draft202012_validator_is_chosen1TestValidate.test_draft202012_validator_is_chosen  sR    J !55	 	 	
 	I !55	 	 	
r2   c                	H    V P                  / \        P                  R 7       R# )r  Nr  r.   s   &r   )test_draft202012_validator_is_the_default6TestValidate.test_draft202012_validator_is_the_default  s    rZ-L-LMr2   c                	   V P                  \        P                  4      ;_uu_ 4       p\        P                  ! ^RR/4       RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)r   r   r   Nz1(?s)Failed validating '.*' in schema.*On instance)r   r   r   r   r   assertRegexr  r  r  s   & r   test_validation_error_message*TestValidate.test_validation_error_message  s[    z99::aVX$67 ;?	
 ;:   A11B	c                	   V P                  \        P                  4      ;_uu_ 4       p\        P                  ! ^R^/4       RRR4       V P                  \        XP                  4      R4       R#   + '       g   i     L7; i)r   r   Nz3(?s)Failed validating '.*' in metaschema.*On schema)r   r   r   r   r   r  r  r  r  s   & r   test_schema_error_message&TestValidate.test_schema_error_message  sZ    z5566!VRL1 7A	
 76r  c                	   R RRR^/RR/./pV P                  \        P                  4      ;_uu_ 4       p\        P                  ! ^V4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)r  r   r   r   r   Nz!12 is less than the minimum of 20)r   r   r   r   r   r   r  r  )r/   r   r  s   &  r   test_it_uses_best_match$TestValidate.test_it_uses_best_match  sv    9b1!
 z99::aF+ ;93q{{;KL ;:s   A;;B	r   N)r[   r   r\   r   r  r  r  r  r  r  r  r  r  r  r   r   r2   r   r|  r|  j  s6    +	
	
	
	

N

	Mr2   r|  c                       ] tR tRtRtR tRtR# )TestThreadingi  a  
Threading-related functionality tests.

jsonschema doesn't promise thread safety, and its validation behavior
across multiple threads may change at any time, but that means it isn't
safe to share *validators* across threads, not that anytime one has
multiple threads that jsonschema won't work (it certainly is intended to).

These tests ensure that this minimal level of functionality continues to
work.
c                	   a . oV3R  lpV! 4        ^ RI Hp V! VR7      pVP                  4        VP                  4        V P	                  VP                  4       S3R. 34       R# )c                    <  \         P                  ! ^%RR7       R#    S P                  \        P                  ! 4       4        R# ; i)r  Tr   N)r   r   r  sysexc_info)faileds   r   r   FTestThreading.test_validation_across_a_second_thread.<locals>.validate  s1    .##R=.clln-s	    &A)Thread)targetFN)	threadingr  startjoinr(   is_alive)r/   r   r  threadr  s   &   @r   &test_validation_across_a_second_thread4TestThreading.test_validation_across_a_second_thread  sS    	. 	
$x(&//+V4ubkBr2   r   N)r[   r   r\   r   r  r  r   r   r2   r   r  r    s    
Cr2   r  c                  "    ] tR tRtR tR tRtR# )TestReferencingi  c                	    R  p\         P                  ! VR7      pRR/p\        P                  ! W2R7      pV P	                  VP                  ^4      VP                  R4      3R4       R# )c                2    \         P                  ! R R/4      # )r   r   )r   create_resource)uris   &r   retrieve=TestReferencing.test_registry_with_retrieve.<locals>.retrieve  s    ..	/BCCr2   )r  r   https://example.com/registryr   N)TF)referencingRegistryr   r   r(   r   )r/   r  r  r   r   s   &    r   test_registry_with_retrieve+TestReferencing.test_registry_with_retrieve  sd    	D '':0133FN	#Y%7%7%>?	
r2   c           	     	   \         P                  ! 4       pR R/p\        P                  ! W!R7      p\        P
                  ! RR7      ;_uu_ 4       p\        P                  ! R4       V P                  \         P                  P                  4      ;_uu_ 4        VP                  ^4       RRR4       RRR4       V P                  X4       R#   + '       g   i     L+; i  + '       g   i     L6; i)r   r  r  Tro  rq  N)r  r  r   r   rr  rs  rt  r   r   Unresolvabler   r  )r/   r  r   r   ru  s   &    r   ;test_custom_registries_do_not_autoretrieve_remote_resourcesKTestReferencing.test_custom_registries_do_not_autoretrieve_remote_resources  s    '')0133FN	$$D11Q!!(+"";#9#9#F#FGG""2& H 2 	 HG 21s%   AC C	*C CC  C0	r   N)r[   r   r\   r   r  r  r   r   r2   r   r  r    s    
	r2   r  c                      ] tR tRtRtRtRR/tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tR tRtR# )TestRefResolveri	  rz   zfoo://storedstoredr   c                	    / V n         V P                  V P                  /V n        \        P
                  ! V P                  V P                   V P                  4      V n        R # r4   )referrer
stored_uristored_schemar4  r   r8  base_urir6  r.   s   &r   r0   TestRefResolver.setUp
	  sD    oot'9'9:
"//MM4==$**
r2   c           	     	   \         P                  P                  R ,          p\        P                  P                  V P                  R4      ;_uu_ 4       pV P                  P                  V4      ;_uu_ 4       p RRR4       RRR4       V P                  X\         P                  P                  4       V P                  XP                  4       R#   + '       g   i     L_; i  + '       g   i     Lj; i)rr   resolve_remoteN)r   r   r6   r   r~  r   r6  r  r(   r  called)r/   r9  patchedresolveds   &   r   6test_it_does_not_retrieve_schema_urls_from_the_networkFTestRefResolver.test_it_does_not_retrieve_schema_urls_from_the_network	  s    ((44T:ZZt}}.>??7((-- . @ 	:#=#=#I#IJ( .- @?s$   $C$8C	:C$C!C$$C4	c                	   R pR\        4       /V P                  R&   V P                  P                  V4      ;_uu_ 4       pV P	                  W P                  R,          R,          4       RRR4       R#   + '       g   i     R# ; i)z#/properties/foor   r  N)r   r  r6  r  r(   )r/   r9  r  s   &  r   test_it_resolves_local_refs+TestRefResolver.test_it_resolves_local_refs	  s^     ',fh&7l#]]$$S))XX}}\'B5'IJ *)))s   *A33B	c                	   R RRRR//p\         P                  P                  VR R7      pVP                  R4      ;_uu_ 4       pV P	                  W1R,          4       RRR4       VP                  R	4      ;_uu_ 4       pV P	                  W1R,          4       RRR4       R#   + '       g   i     LL; i  + '       g   i     R# ; i)
rr   zhttp://bar/schema#re   r   r   c                &    V P                  R R4      # ry   r{   r  s   &r   r   ETestRefResolver.test_it_resolves_local_refs_with_id.<locals>.<lambda>#	      D"!5r2   r   z#/aNzhttp://bar/schema#/a)r   r8  from_schemar  r(   r/   r   r6  r  s   &   r   #test_it_resolves_local_refs_with_id3TestRefResolver.test_it_resolves_local_refs_with_id	  s    ,cE5>B**665 7 
 &&(Xc{3 ' 6778Xc{3 87 '&777s   B!>B4!B1	4C	c                	   V P                   P                  V P                  4      ;_uu_ 4       pV P                  WP                  4       R R R 4       R^/V P                   P
                  R&   V P                   P                  R4      ;_uu_ 4       pV P                  V^4       R R R 4       R #   + '       g   i     Lk; i  + '       g   i     R # ; i)Nr   
cached_refzcached_ref#/foo)r6  r  r  r  r  r4  r(   )r/   r  s   & r   test_it_retrieves_stored_refs-TestRefResolver.test_it_retrieves_stored_refs*	  s    ]]$$T__55MM($6$67 6 .3BKL)]]$$%6778Xr* 87	 65 877s   B-C -B=	 C	c                	   R pR^/pR\         P                  9   dA   V P                  \         P                  P                  R\         P                  R,          4       \	        RV/4      \         P                  R&   V P
                  P                  V4      ;_uu_ 4       pV P                  V^4       RRR4       R#   + '       g   i     R# ; i)http://bar#bazr  requests
http://barN)r  modulesr'   __setitem__ReallyFakeRequestsr6  r  r(   )r/   r9  r   r  s   &   r   ,test_it_retrieves_unstored_refs_via_requests<TestRefResolver.test_it_retrieves_unstored_refs_via_requests2	  s    $OO''S[[5L #5lF5K"LJ]]$$S))XXr* *)))s   B::C	c           	     	"  a a R pR^/oR\         P                  9   dA   S P                  \         P                  P                  R\         P                  R,          4       R\         P                  R&   \        VV 3R l4       p\
        P                  ! RVR7      ;_uu_ 4        S P                  P                  V4      ;_uu_ 4       p RRR4       RRR4       S P                  X^4       R#   + '       g   i     L,; i  + '       g   i     L7; i)r  r  r  Nc              3     <"   SP                  V R 4       \        \        P                  ! S4      P	                  R4      4      x  R# 5i)r  utf8N)r(   r   jsondumpsencode)urlr   r/   s   &r   fake_urlopenQTestRefResolver.test_it_retrieves_unstored_refs_via_urlopen.<locals>.fake_urlopenI	  s5     S,/$**V,33F;<<s   AAzurllib.request.urlopenr   )
r  r  r'   r  r   r   r~  r6  r  r(   )r/   r9  r  r  r   s   f   @r   +test_it_retrieves_unstored_refs_via_urlopen;TestRefResolver.test_it_retrieves_unstored_refs_via_urlopen?	  s    $OO''S[[5L #'J		= 
	= ZZ0lCC((-- . D 	2& .- DCs$   !$C>C+	C>+C;6C>>D	c                	   \         P                  ! R RR7      ;_uu_ 4       pV P                  \        P                  VP
                  4       \        P                  ! RR/V4       RRR4       R\        XP
                  4       R2pV P                  P                  V4      ;_uu_ 4       pV P                  VR4       RRR4       R#   + '       g   i     Li; i  + '       g   i     R# ; i)Fwt)deletemoder   r   Nzfile://z#foo)tempfileNamedTemporaryFiler'   osremover   r  dumpr   r6  r  r(   )r/   tempfr9  r  s   &   r   (test_it_retrieves_local_refs_via_urlopen8TestRefResolver.test_it_retrieves_local_refs_via_urlopenS	  s    ((DAAUOOBIIuzz2IIuene, B UZZ016]]$$S))XXu- *) BA
 *))s   AC)CC	C*	c                	   R R/p\         P                  P                  VR R7      pV P                  VP                  R4       V P                  VP
                  R4       VP                  R4      ;_uu_ 4       pV P                  W14       RRR4       VP                  R4      ;_uu_ 4       pV P                  W14       RRR4       VP                  R4      ;_uu_ 4       pV P                  W14       RRR4       VP                  R4      ;_uu_ 4       pV P                  W14       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lk; i  + '       g   i     R# ; i)rr   r   c                &    V P                  R R4      # ry   r{   r  s   &r   r   PTestRefResolver.test_it_can_construct_a_base_uri_from_a_schema.<locals>.<lambda>`	  r  r2   r  rz   N#zfoo#r   r8  r  r(   r  resolution_scoper  r  s   &   r   .test_it_can_construct_a_base_uri_from_a_schema>TestRefResolver.test_it_can_construct_a_base_uri_from_a_schema\	  s   **665 7 
 	**E222E:##xX. $$$X. %&&(X. '''8X. (' $#$$&&'''s0   8D-+E EE&-D=	 E	E#	&E7	c                	   / p\         P                  P                  V4      pV P                  VP                  R 4       V P                  VP
                  R 4       VP                  R 4      ;_uu_ 4       pV P                  W14       RRR4       VP                  R4      ;_uu_ 4       pV P                  W14       RRR4       R#   + '       g   i     LE; i  + '       g   i     R# ; i)rz   Nr
  r  r  s   &   r   9test_it_can_construct_a_base_uri_from_a_schema_without_idITestRefResolver.test_it_can_construct_a_base_uri_from_a_schema_without_idm	  s    **66v>**B/22B7##xX. $$$X. %$ $#$$$s   3C&CC	C&	c                	   a aa VVV 3R  lpRR/oRo\         P                  ! R/ RV/R7      pVP                  S4      ;_uu_ 4       pS P                  VS4       RRR4       R#   + '       g   i     R# ; i)c                ,   < SP                  V S4       S# r4   r  )r  r9  r   r/   s   &r   handler@TestRefResolver.test_custom_uri_scheme_handlers.<locals>.handlerx	  s    S#&Mr2   r   r   	foo://barrz   handlersN)r   r8  r  r(   )r/   r  r6  r  r9  r   s   f   @@r   test_custom_uri_scheme_handlers/TestRefResolver.test_custom_uri_scheme_handlersw	  sc    	 **2rUG<LM$$Xv. %$$$s   A##A4	c                	D  a a \        4       .oVV 3R  lpRp\        P                  ! R/ RRV/R7      pVP                  V4      ;_uu_ 4         RRR4       VP                  V4      ;_uu_ 4         RRR4       R#   + '       g   i     L5; i  + '       g   i     R# ; i)c                l   <  SP                  4       #   \         d    SP                  R 4        R# i ; i)z#Response must not have been cached!NrZ   
IndexErrorr    r  responser/   s   &r   r  5TestRefResolver.test_cache_remote_on.<locals>.handler	  s3    A||~% A		?@A    33r  rz   Tr   cache_remoter  Nr   r   r8  r  r/   r  r9  r6  r   s   f   @r   test_cache_remote_on$TestRefResolver.test_cache_remote_on	  s    H:	A **0@
 $$ %$$ %$ %$$$$s   A;/B;B	B	c                	   a a \        4       .oVV 3R  lpRp\        P                  ! R/ RRV/R7      pVP                  V4      ;_uu_ 4         RRR4       R#   + '       g   i     R# ; i)c                l   <  SP                  4       #   \         d    SP                  R 4        R# i ; i)zHandler called twice!Nr  r  s   &r   r  6TestRefResolver.test_cache_remote_off.<locals>.handler	  s0    3||~% 3		123r"  r  rz   Fr   r#  Nr%  r&  s   f   @r   test_cache_remote_off%TestRefResolver.test_cache_remote_off	  s[    H:	3 **%1A
 $$ %$$$s   AA)	c           	     	  a \        R 4      oV3R lpRp\        P                  ! R/ RV/R7      pV P                  \        P
                  4      ;_uu_ 4       pVP                  V4      ;_uu_ 4        V P                  R4       RRR4       RRR4       V P                  XP                  \        P
                  ! S4      4       R#   + '       g   i     LJ; i  + '       g   i     LU; i)zOh no! What's this?c                   < Shr4   r   )r  r  s   &r   r  TTestRefResolver.test_if_you_give_it_junk_you_get_a_resolution_error.<locals>.handler	  s    Kr2   r  rz   r   r  zShouldn't get this far!N)
r  r   r8  r   r   _RefResolutionErrorr  r    r(   r  )r/   r  r9  r6  errr  s   &    @r   3test_if_you_give_it_junk_you_get_a_resolution_errorCTestRefResolver.test_if_you_give_it_junk_you_get_a_resolution_error	  s    01	 **2rUG<LMz==>>###C((		34 ) ? 	
(F(Fu(MN )( ?>s$   C1C	CCCC(	c                	D   \         P                  ! R / 4      pVP                  4        V P                  \        P
                  4      ;_uu_ 4       pVP                  4        RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)rz   NzFailed to pop the scope)	r   r8  	pop_scoper   r   r1  r   r  r  )r/   r6  excs   &  r   .test_helpful_error_message_on_failed_pop_scope>TestRefResolver.test_helpful_error_message_on_failed_pop_scope	  sk    **2r2z==>>#  ?/S]]1CD ?>s   BB	c                   \         P                  P                  p\         P                  ! RV4      p\         P                  ! WR7      pV P	                  VP                  RR/4      4       RR\         P                  P                  R,          /./p\         P                  ! RV4      p\         P                  ! WER7      pV P	                  VP                  RR/4      4       R# )	z
See #1085.
rz   r5  r]  r   allOfr   r$   N)r   r  r6   r8  r  r   )r/   r   oner   anothertwos   &     r   ,test_pointer_within_schema_with_different_id<TestRefResolver.test_pointer_within_schema_with_different_id	  s     ++77%%b&1..vD	++[%,@AB vz99EEeLMN
 %%b'2..wE	++[%,@ABr2   c                ,  a  V 3R lp\         P                  ! R/ RV/R7      p\         P                  ! / \         P                  P                  R7      pRRRR	/pV! WBR
7      pS P                  VP                  / 4      VP                  ^%4      3R4       R# )zZ
See https://github.com/python-jsonschema/jsonschema/issues/1061#issuecomment-1624266555.
c                0   < SP                  V R 4       RR/# )zhttp://example.com/foor   r   r  )r  r/   s   &r   handleNTestRefResolver.test_newly_created_validator_with_ref_resolver.<locals>.handle	  s    S":;I&&r2   rz   httpr  r   r$   zhttp://example.com/barr   r   r5  NFT)r   r8  r,   r   r5   r(   r   )r/   rC  r6  r-   r   r   s   f     r   .test_newly_created_validator_with_ref_resolver>TestRefResolver.test_newly_created_validator_with_ref_resolver	  s    
	' **2rVV<LM%%!11<<
	 165Af8	#Y%7%7%;<	
r2   c                    RRRR//RRRR///p\         P                  ! V\         P                  ! RV4      R	7      pV P                  VP	                  RR
/4      VP	                  R^%/4      3R4       R# )zZ
See https://github.com/python-jsonschema/jsonschema/issues/1124#issuecomment-1632574249.
r  xr   z#/definitions/xr  r   r   rz   r5  yNrF  )r   r   r8  r(   r   )r/   r   r   s   &  r   2test_refresolver_with_pointer_in_schema_with_no_idBTestRefResolver.test_refresolver_with_pointer_in_schema_with_no_id	  s     3): ;<C&)!45

 33,,R8
	 	c
+Y-?-?b	-JK	
r2   )r  r6  r4  N)r[   r   r\   r   r  r  r  r0   r  r  r  r  r  r  r  r  r  r  r'  r,  r3  r8  r?  rG  rL  r   r   r2   r   r  r  	  st    HJx(M
)K	4++'(./"/	/$ OEC 
*
r2   r  c                     R  p\        WR7      # )c                    V P                    Uu. uF  p\        V4      NK  	  upV P                   Uu. uF  p\        V4      NK  	  up3# u upi u upi r4   )r  r  rH   )r  r  s   & r   keysorted_errors.<locals>.key	  sJ    "ZZ(ZSVZ("../.SV./
 	
(/s
   AA)rP  )sorted)r   rP  s   & r   r  r  	  s    

 &""r2   c                  (    ] tR tRt$ R]R&   R tRtR# )r  i	  zdict[str, Any]
_responsesc                	    V P                   P                  V4      pVf   \        R\        V4      ,           4      h\	        \
        P                  ! V4      4      # )NzUnknown URL: )rT  r|   r  ra   _ReallyFakeJSONResponser  r  )r/   r  r   s   && r   r|   ReallyFakeRequests.get 
  sC    ??&&s+;_tCy899&tzz(';<<r2   r   N)r[   r   r\   r   r  r|   r   r   r2   r   r  r  	  s     =r2   r  c                  (    ] tR tRt$ R]R&   R tRtR# )rV  i
  r  	_responsec                	B    \         P                  ! V P                  4      # r4   )r  loadsrY  r.   s   &r   r  _ReallyFakeJSONResponse.json
  s    zz$..))r2   r   N)r[   r   r\   r   r  r  r   r   r2   r   rV  rV  
  s     N*r2   rV  ):
__future__r   collectionsr   r   
contextlibr   decimalr   ior   typingr	   unittestr
   r   urllib.requestr   r  r  r  r  rr  attrsr   r   referencing.jsonschemar   referencing.exceptionsr  
jsonschemar   r   r   r   r   r    r"   r   r  rR  rl  r  r  r  r  r!  r#  r'  r)  r.  r|  r  r  r  r  r  rV  r   r2   r   <module>ri     s   " ) %    # '  	 
    .  1L6( L6^~
( ~
BL
 L
^5
 5
pwE- wEtJ J4H-/A8 H@)-/A8 )),h )),h ))18 ))18 )%( %LJx LJ^^M8 ^MBCH C>h 4j
h j
\# = = = * * *r2   