+
     hW c                  s   ^ 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              #  st   "   V F-  pVP                  R R4       \        P                  ! R/ VB x  K/  	  R# 5i)messagezYou told me to fail!N )Z
setdefaultr   ValidationError)	validatorerrorsinstanceschemaZeachs   &&&& E/usr/lib/python3.14/site-packages/jsonschema/tests/test_validators.pyfailr      s2     	#9:((0400 s   68c                  s    ] 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                	s   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self   &r   setUpZTestCreateAndExtend.setUp$   s    $$))*	

 	""''(	
 "#78!4.'M#**((**
    c                	s    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'   r)   r   
test_attrsZTestCreateAndExtend.test_attrs9   s\    ))**++
   !!
	
r+   c                	sd    R . /pV P                  V P                  V4      P                  V4       R# )r   N)r!   r&   r   r(   r      & r   	test_initZTestCreateAndExtend.test_initF   s*    "/66?r+   c                	s    R . /pV P                  V4      p\        VP                  R4      4      pV P                  V. 4       R# )r   ZhelloN)r&   listiter_errorsr!   r(   r   r   r      &   r   test_iter_errors_successfulZ/TestCreateAndExtend.test_iter_errors_successfulJ   s>    "NN6*	i++G45$r+   c           
     	s\   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   r4   r5   r!   lenZ	_contents)r(   r   r   Zexpected_errorr      &    r   test_iter_errors_one_errorZ.TestCreateAndExtend.test_iter_errors_one_errorQ   s    Iy123NN6*	#33'34vh
 i++I67Va(,,.0H0H0JKr+   c                	s    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   ZFirstzSecond!r   ZasdfZThirdr9   N)r&   r4   r5   r!   r<   r6   r7   r    test_iter_errors_multiple_errorsZ4TestCreateAndExtend.test_iter_errors_multiple_errorsb   sf    G$I{F;G$
 NN6*	i++I67Va(r+   c                	sR   \         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   versionZMyVersionValidatorN)	r   r%   r    r"   popr$   r!   __name____qualname__r(   r&   r2   r   .test_if_a_version_is_provided_it_is_registeredZBTestCreateAndExtend.test_if_a_version_is_provided_it_is_registeredo   s    %%, 
	 	
0044kB
..22LA++-AB//1EFr+   c                	s$   \         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   r@   rA   rB   z2MyVersionValidator(schema={}, format_checker=None)N)r   r%   r    r"   rD   r$   r!   reprrG   r2   r   	test_reprZTestCreateAndExtend.test_repry   sp    %%, 
	 	
0044kB
..22LA2@	
r+   c                	sL   \         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   r@   rA   rB   ai  zNMyVersionValidator(schema={'a': [0, 1, 2, 3, 4, 5, ...]}, format_checker=None)N)
r   r%   r    r"   rD   r$   r!   rI   r4   ZrangerG   r2   r   test_long_reprZ"TestCreateAndExtend.test_long_repr   s    %%, 
	 	
0044kB
..22LACeDk!2345'	
r+   c                	sv    \         P                  ! / R 7      pV P                  \        V! / 4      4      R4       R# )r   z)Validator(schema={}, format_checker=None)N)r   r%   r!   rI   rG   r2   r   test_repr_no_versionZ(TestCreateAndExtend.test_repr_no_version   s/    %%"5	27	
r+   c                	s   \         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   r@   zfoo-barrB   ZFooBarValidatorN)r   r%   r    r"   rD   r$   r!   rF   rG   r2   r   -test_dashes_are_stripped_from_validator_namesZATestCreateAndExtend.test_dashes_are_stripped_from_validator_names   sj    %%,
	 	
0044kB
..22I>//1BCr+   c                	s    \        \        P                  4      p\        P                  ! R R /R7       V P	                  \        P                  V4       R# )idrM   N)r#   r   r"   r%   r!   )r(   originalr2   r   6test_if_a_version_is_not_provided_it_is_not_registeredZJTestCreateAndExtend.test_if_a_version_is_not_provided_it_is_not_registered   s:    
001tTl3118<r+   c                	s.   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 idrP   rA   c                &    V P                  R R4      # rP    getZsr)   r   <lambda>ZMTestCreateAndExtend.test_validates_registers_meta_schema_id.<locals>.<lambda>       AEE$Or+   r   rC   id_ofNr   r%   r    r"   rD   r$   assertInr(   Zmeta_schema_keyZmy_meta_schema   &  r   'test_validates_registers_meta_schema_idZ;TestCreateAndExtend.test_validates_registers_meta_schema_id   sr    *0& +	

 	
0044oF
..22LAoz'?'?@r+   c                	s*   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   rA   rB   Nr^   r`   ra   r   .test_validates_registers_meta_schema_draft6_idZBTestCreateAndExtend.test_validates_registers_meta_schema_draft6_id   so    +1& 	
 	
0044oF
..22LAoz'?'?@r+   c                	s  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  sX   <"   T F  w  rS! / 4      P                  W!R 7      x  K!  	  R# 5i))r   typeN)is_type)Z.0rf   r   r&   s   &  r   Z	<genexpr>Z@TestCreateAndExtend.test_create_default_types.<locals>.<genexpr>   s3      'ND "%%x%CC's   '*arrayTNobjectFr   )booleanT)integer   )ZnullN)numberg      (@)stringfoo)r   r%   
assertTrueZallrG   s   &@r   test_create_default_typesZ-TestCreateAndExtend.test_create_default_types   s    %%"D	C  bM%#"$rN%'CC	
	
  bM%#"$rN%' 	
r+   c                s~   \         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constrM   ro   barN)	r   r%   Draft202012Validatorr.   check_schemaassertRaisesr   SchemaErrorvalidater(   ZNoEmptySchemasValidatorr2   r   +test_check_schema_with_different_metaschemaZ?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                s    \         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!re   N)r   r%   r   rx   r   ry   rw   r{   r2   r   <test_check_schema_with_different_metaschema_defaults_to_selfZPTestCreateAndExtend.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                	s   \        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&   r-   ri   r   extendr!   r.   r/   )r(   rQ   r~   ZExtendedr7   r   test_extendZTestCreateAndExtend.test_extend   s    112h$$NNs|
 	##$$%%))	 X'**++		
r+   c                sX  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                sZ   < V P                  R SP                  P                  V 4      4      # )__test__)rX   r&   ID_OF)r   r(      &r   r]   Z3TestCreateAndExtend.test_extend_idof.<locals>.id_of  s#    ::j$..*>*>v*FGGr+   zthe://correct/id/r   zthe://wrong/id/r   )r   r   r   r]   N)r   r%   r   r!   r   r.   r   )r(   r]   Z
correct_idr   ZOriginalDerived   f     r   test_extend_idofZ$TestCreateAndExtend.test_extend_idof
  s    	H(
$

 $$#**	
 	(<(<=zJ##H-w':':;ZHr+   c                s   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.
$defsZtestrf   rm   $refz#/$defs/testmaximumN)r   Draft4Validatorrp   is_validr   )r(   r   Zdraft4r   r7   r   !test_extend_applicable_validatorsZ5TestCreateAndExtend.test_extend_applicable_validators   s|     fvx01Nq
 ++F3+,##J$>$>?0045r+   )r&   r   r   r   N)rE   
__module__rF   __firstlineno__r*   r0   r3   r8   r>   r?   rH   rJ   rL   rN   rO   rR   rb   rd   rq   r|   r}   r   r   r   __static_attributes__r   r+   r   r   r   #   sn    
*
@%L")G



D=
AA
"@&5
,I,6r+   r   c                  sr   ] 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                	sF   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 )Zmsgz"Expected exactly one error, found )
rD   r   _LATEST_VERSIONrw   r4   r5   rp   r!   r<   r   )r(   r   r   ZargsZkwargsr   r   r   s   &&&*,   r   message_forZ'TestValidationErrorMessages.message_for3  s    jj
 : :; 000	i++H56&@$MNK4VJ? 	 	

 ay   r+   c                	sT    V P                  ^RR/R7      pV P                  VR4       R#    rf   rn   r   r   1 is not of type 'string'Nr   r!   r(   r   r2   r   test_single_type_failureZ4TestValidationErrorMessages.test_single_type_failure@  s-    ""Avx6H"I"=>r+   c                	sV    V P                  ^RR./R7      pV P                  VR4       R# r   r   r   r2   r   test_single_type_list_failureZ9TestValidationErrorMessages.test_single_type_list_failureD  s/    ""Avz6J"K"=>r+   c                	sj    RpV P                  ^R\        V4      /R7      pV P                  VR4       R# )rn   rf   r   z#1 is not of type 'string', 'object'N)rn   ri   )r   r4   r!   )r(   Ztypesr   ra   r   test_multiple_type_failureZ6TestValidationErrorMessages.test_multiple_type_failureH  s6    """AvtE{6K"L"GHr+   c                	s    R RRR^/./pV P                  ^V\        P                  R7      pV P                  VR4       R# )rf   nameZFoominimumr   r   r   z1 is not of type 'Foo'Nr   r   Draft3Validatorr!   r(   r   r   ra   r   #test_object_with_named_type_failureZ?TestValidationErrorMessages.test_object_with_named_type_failureM  sO    FE9a89:""** # 

 	":;r+   c                	sT    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   r2   r   test_minimumZ(TestValidationErrorMessages.test_minimumV  s,    ""Ay!n"E"CDr+   c                	sT    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   r2   r   test_maximumZ(TestValidationErrorMessages.test_maximumZ  s,    ""Ay!n"E"FGr+   c                	s    R Rr!RW//pV P                  R ^/V\        P                  R7      pV P                  VR4       R# ru   ro   Zdependenciesr   z'foo' is a dependency of 'bar'Nr   r(   ZdependZonr   r   r=   r    test_dependencies_single_elementZ<TestValidationErrorMessages.test_dependencies_single_element^  sP    E 6,/""QZ** # 

 	"BCr+   c                	s    R R^/./pV P                  ^R V./\        P                  R7      pV P                  VR4       R# )rf   r   r   z+1 is not of type {'type': [{'minimum': 3}]}Nr   )r(   rf   r   ra   r   -test_object_without_title_type_failure_draft3ZITestValidationErrorMessages.test_object_without_title_type_failure_draft3h  sT    )Q()""TF#** # 

 	9	
r+   c                	    R Rr!RW.//pV P                  R ^/V\        P                  R7      pV P                  VR4       R# r   r   r   r=   r   test_dependencies_list_draft3Z9TestValidationErrorMessages.test_dependencies_list_draft3t  R    E 64.1""QZ** # 

 	"BCr+   c                	r   r   r   r   Draft7Validatorr!   r   r=   r   test_dependencies_list_draft7Z9TestValidationErrorMessages.test_dependencies_list_draft7~  r   r+   c                	sx    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   r2   r   #test_additionalItems_single_failureZ?TestValidationErrorMessages.test_additionalItems_single_failure  sC    ""SR!2E:** # 

 	*G4r+   c                	sz    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   r2   r   &test_additionalItems_multiple_failuresZBTestValidationErrorMessages.test_additionalItems_multiple_failures  sA    ""R!2E:** # 

 	17;r+   c                	s`    R pRR/pV P                  V^/VR7      pV P                  RV4       R# )ro   additionalPropertiesFr   z('foo' was unexpected)Nr   r_   )r(   Z
additionalr   r   r7   r   (test_additionalProperties_single_failureZDTestValidationErrorMessages.test_additionalProperties_single_failure  s9    
(%0""ZOF"K.8r+   c                	s    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   Fro   ru   r   zwere unexpected)N)r   r#   Zfromkeysr_   rI   r   ra   r   +test_additionalProperties_multiple_failuresZGTestValidationErrorMessages.test_additionalProperties_multiple_failures  si    (%0""]]E5>2 # 

 	d5k7+d5k7+('2r+   c                	s\    R ^/pV P                  RR/VR7      pV P                  RV4       R# )rt   ro   ru   r   z12 was expectedNr   r   ra   r   
test_constZ&TestValidationErrorMessages.test_const  s;    2""U^ # 
 	'1r+   c                	s    R R^//pV P                  ^/ . .V\        P                  R7      pV P                  VR4       R# )containsrt   r   z4None of [2, {}, []] are valid under the given schemaN)r   r   Draft6Validatorr!   r   ra   r   test_contains_draft_6Z1TestValidationErrorMessages.test_contains_draft_6  sP    wm,""R[** # 

 	B	
r+   c                	s   \        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# )	)Zformatsthingc                s    R # )Fr   )valuer)   r   rZ   ZQTestValidationErrorMessages.test_invalid_format_default_message.<locals>.<lambda>  s    er+   formatZbla)r   r   format_checkerzis not aNr   )r   checksr   r_   rI   )r(   checkerr   r   r7   r   #test_invalid_format_default_messageZ?TestValidationErrorMessages.test_invalid_format_default_message  sz    +w 34G$""" # 
 	d5k7+d7mW-j'*r+   c                	s   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# )rf   ri   r   FpatternPropertiesz^abc$rn   z^def$Zzebrar   z,{} does not match any of the regexes: {}, {}Zfishi  z.{}, {} do not match any of the regexes: {}, {}N)r   r   r   r!   r   rI   r   ra   r   1test_additionalProperties_false_patternPropertiesZMTestValidationErrorMessages.test_additionalProperties_false_patternProperties  s    ((%%11( ""s^** # 

 	:AAWtG}d7m	
 ""sFC0** # 

 	<CCVd7mT']DM	
r+   c                	sP    V P                  R RR7      pV P                  VR4       R# )r@   Fr   z'False schema does not allow 'something'Nr   r   r2   r   test_False_schemaZ-TestValidationErrorMessages.test_False_schema  s0    ""  # 
 	"KLr+   c                	T    V P                  ^R^/R7      pV P                  VR4       R# )r   Z
multipleOfr   z3 is not a multiple of 2Nr   r   r2   r   test_multipleOfZ+TestValidationErrorMessages.test_multipleOf  s5    "" !$ # 
 	"<=r+   c                	sT    V P                  . R ^/R7      pV P                  VR4       R# )minItemsr   z[] is too shortNr   r   r2   r   test_minItemsZ)TestValidationErrorMessages.test_minItems  s,    ""B
A"G"34r+   c                	sX    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   r2   r   test_maxItemsZ)TestValidationErrorMessages.test_maxItems  s,    ""Iz1o"N"9:r+   c                	sT    V P                  . R ^/R7      pV P                  VR4       R# )r   r   z[] should be non-emptyNr   r   r2   r   test_minItems_1Z+TestValidationErrorMessages.test_minItems_1   s,    ""B
A"G":;r+   c                	sX    V P                  . ROR^ /R7      pV P                  VR4       R# )r   r   r   z![1, 2, 3] is expected to be emptyNr   r   r   r2   r   test_maxItems_0Z+TestValidationErrorMessages.test_maxItems_0  s,    ""Iz1o"N"EFr+   c                	T    V P                  R R^/R7      pV P                  VR4       R# )rV   	minLengthr   z'' is too shortNr   r   r2   r   test_minLengthZ*TestValidationErrorMessages.test_minLength  s5    ""# # 
 	"34r+   c                	r   )abc	maxLengthr   z'abc' is too longNr   r   r2   r   test_maxLengthZ*TestValidationErrorMessages.test_maxLength  s5    ""# # 
 	"56r+   c                	sT    V P                  R R^/R7      pV P                  VR4       R# )rV   r   r   z'' should be non-emptyNr   r   r2   r   test_minLength_1Z,TestValidationErrorMessages.test_minLength_1  s-    ""BQ7G"H":;r+   c                	sT    V P                  R R^ /R7      pV P                  VR4       R# )r   r   r   z'abc' is expected to be emptyNr   r   r2   r   test_maxLength_0Z,TestValidationErrorMessages.test_maxLength_0  s-    ""E;:J"K"ABr+   c                	sT    V P                  / R ^/R7      pV P                  VR4       R# )minPropertiesr   z"{} does not have enough propertiesNr   r   r2   r   test_minPropertiesZ.TestValidationErrorMessages.test_minProperties  s-    ""B7K"L"FGr+   c                	s`    V P                  R / R/ R/ /R^/R7      pV P                  VR4       R# )rK   bZcmaxPropertiesr   z3{'a': {}, 'b': {}, 'c': {}} has too many propertiesNr   r   r2   r   test_maxPropertiesZ.TestValidationErrorMessages.test_maxProperties"  sE    ""2sBR0#Q' # 
 	A	
r+   c                	sT    V P                  / R ^/R7      pV P                  VR4       R# )r   r   z{} should be non-emptyNr   r   r2   r   test_minProperties_1Z0TestValidationErrorMessages.test_minProperties_1,  s-    ""B7K"L":;r+   c                	sX    V P                  ^^/R^ /R7      pV P                  VR4       R# )r   r   r   z{1: 2} is expected to be emptyNr   r   r2   r   test_maxProperties_0Z0TestValidationErrorMessages.test_maxProperties_00  s9    ""V#Q' # 
 	"BCr+   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   ro   r   r   r2   r   test_prefixItems_with_itemsZ7TestValidationErrorMessages.test_prefixItems_with_items7  s@    """UMB8< # 
 	?	
r+   c                	r   )r   r   Fr   r   z6Expected at most 2 items but found 2 extra: ['foo', 5]Nr   r   ro      r   r   r2   r   *test_prefixItems_with_multiple_extra_itemsZFTestValidationErrorMessages.test_prefixItems_with_multiple_extra_itemsA  s@    ""%UMB8< # 
 	D	
r+   c                	sT    V P                  R RR/R7      pV P                  VR4       R# )Zbbbpatternz^a*$r   z'bbb' does not match '^a*$'Nr   r   r2   r   test_patternZ(TestValidationErrorMessages.test_patternK  s5    ""v& # 
 	"?@r+   c                	sX    V P                  . R RR//R7      pV P                  VR4       R# )r   rf   rn   r   z3[] does not contain items matching the given schemaNr   r   r2   r   test_does_not_containZ1TestValidationErrorMessages.test_does_not_containR  s=    "" 23 # 
 	A	
r+   c                	s`    V P                  R ^.RRR/R^/R7      pV P                  VR4       R# )ro   r   rf   rn   minContainsr   MToo few items match the given schema (expected at least 2 but only 1 matched)Nr   r   r2   r   test_contains_too_fewZ1TestValidationErrorMessages.test_contains_too_few\  sG    ""QZ 2M1E # 
 	7	
r+   c           	     	sd    V P                  R ^.RRR/R^R^/R7      pV P                  VR4       R# )	ro   r   rf   rn   r   maxContainsr   r   Nr   r   r2   r   &test_contains_too_few_both_constrainedZBTestValidationErrorMessages.test_contains_too_few_both_constrainedg  sO    ""QZVX.qq # 
 		
r+   c                	s`    V P                  . RORRR/R^/R7      pV P                  VR4       R# )	ro   r   rf   rn   r   r   :Too many items match the given schema (expected at most 2)Nro   ru   bazr   r   r2   r   test_contains_too_manyZ2TestValidationErrorMessages.test_contains_too_manyv  sA    ""* 2M1E # 
 	H	
r+   c           	     	sp    V P                  R .^,          RRR/R^R^/R7      pV P                  VR4       R# )	ro   r   rf   rn   r   r   r   z:Too many items match the given schema (expected at most 4)Nr   r   r2   r   'test_contains_too_many_both_constrainedZCTestValidationErrorMessages.test_contains_too_many_both_constrained  sO    ""Wq[VX.qq # 
 	H	
r+   c                	sT    V P                  ^R^/R7      pV P                  VR4       R# )r   ZexclusiveMinimumr   z+3 is less than or equal to the minimum of 5Nr   r   r2   r   test_exclusiveMinimumZ1TestValidationErrorMessages.test_exclusiveMinimum  s8    ""&* # 
 	9	
r+   c                	r   )r   ZexclusiveMaximumr   z.3 is greater than or equal to the maximum of 2Nr   r   r2   r   test_exclusiveMaximumZ1TestValidationErrorMessages.test_exclusiveMaximum  s1    ""A7I16M"N<	
r+   c                	V    V P                  / R R./R7      pV P                  VR4       R# )requiredro   r   z'foo' is a required propertyNr   r   r2   r   test_requiredZ)TestValidationErrorMessages.test_required  s/    ""B
UG7L"M"@Ar+   c                	s^    V P                  R / /RR R.//R7      pV P                  VR4       R# )ro   ZdependentRequiredru   r   z'bar' is a dependency of 'foo'Nr   r   r2   r   test_dependentRequiredZ2TestValidationErrorMessages.test_dependentRequired  s@    ""R['%%)9: # 
 	"BCr+   c                	r   )oneOfFr   z.{} is not valid under any of the given schemasNr   r   r2   r   test_oneOf_matches_noneZ3TestValidationErrorMessages.test_oneOf_matches_none  s2    ""B%7I"J<	
r+   c                	sX    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   r2   r   test_oneOf_matches_too_manyZ7TestValidationErrorMessages.test_oneOf_matches_too_many  s1    ""B$7N"O"HIr+   c                	s`    R RRR/pV P                  RR.VR7      pV P                  VR4       R# )	rf   rh   unevaluatedItemsFro   ru   r   z@Unevaluated items are not allowed ('foo', 'bar' were unexpected)Nr   r   ra   r   test_unevaluated_itemsZ2TestValidationErrorMessages.test_unevaluated_items  s<    '#5u=""UEN6"JN	
r+   c                	\    R RRR/pV P                  RVR7      pV P                  VR4       R# )rf   rh   r   Fro   r   z'foo' is not of type 'array'Nr   r   ra   r   &test_unevaluated_items_on_invalid_typeZBTestValidationErrorMessages.test_unevaluated_items_on_invalid_type  s7    '#5u=""E&"A"@Ar+   c                	st    R RRR//RR^//pV P                  RRRRR^/VR7      pV P                  VR	4       R
# )
propertiesro   rf   rn   unevaluatedPropertiesrt   ru   r   r   z_Unevaluated properties are not valid under the given schema ('bar' was unevaluated and invalid)Nr   r   ra   r   5test_unevaluated_properties_invalid_against_subschemaZQTestValidationErrorMessages.test_unevaluated_properties_invalid_against_subschema  si    568"45#gr]
 ""uur
  # 
 	2	
r+   c                	sd    R RRR/pV P                  RRRR/VR7      pV P                  VR4       R# )	rf   ri   r  Fro   ru   r   zEUnevaluated properties are not allowed ('bar', 'foo' were unexpected)Nr   r   ra   r   &test_unevaluated_properties_disallowedZBTestValidationErrorMessages.test_unevaluated_properties_disallowed  sR    ($;UC""uu  # 
 	-	
r+   c                	r   )rf   ri   r  Fro   r   z'foo' is not of type 'object'Nr   r   ra   r   +test_unevaluated_properties_on_invalid_typeZGTestValidationErrorMessages.test_unevaluated_properties_on_invalid_type  s7    ($;UC""E&"A"ABr+   c                	b    R / .RR/pV P                  . ROVR7      pV P                  VR4       R# )r   r   Fr   z9Expected at most 1 item but found 2 extra: ['bar', 'baz']Nr   r   r   ra   r   test_single_itemZ,TestValidationErrorMessages.test_single_item  sC    "w6""* # 
 	G	
r+   c                	s    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ro   ru   %   r   r   ra   r   -test_heterogeneous_additionalItems_with_ItemsZITestValidationErrorMessages.test_heterogeneous_additionalItems_with_Items  sM    B4!2E:""'** # 

 	J	
r+   c                	r  )r   r   Fr   z6Expected at most 1 item but found 2 extra: ['bar', 37]Nr  r   r   ra   r   $test_heterogeneous_items_prefixItemsZ@TestValidationErrorMessages.test_heterogeneous_items_prefixItems   sC    "w6""' # 
 	D	
r+   c                	r  )r   r   Fr   z=Unevaluated items are not allowed ('bar', 37 were unexpected)Nr  r   r   ra   r   /test_heterogeneous_unevaluatedItems_prefixItemsZKTestValidationErrorMessages.test_heterogeneous_unevaluatedItems_prefixItems  sD    "'95A""' # 
 	K	
r+   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  ro   r   FrK   r   r   z?Additional properties are not allowed (37, 'a' were unexpected)Nr   r   ra   r   2test_heterogeneous_properties_additionalPropertiesZNTestValidationErrorMessages.test_heterogeneous_properties_additionalProperties  sU     -CUK""ReR4 # 
 	M	
r+   c                r  )
r  r  ro   r  FrK   r   r   z@Unevaluated properties are not allowed (37, 'a' were unexpected)Nr   r   ra   r   3test_heterogeneous_properties_unevaluatedPropertiesZOTestValidationErrorMessages.test_heterogeneous_properties_unevaluatedProperties$  sU     -DeL""ReR4 # 
 	N	
r+   r   N)?rE   r   rF   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   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  r
  r  r  r  r  r   r   r+   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
	


	
	


r+   r   c                  s    ] 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                	s   ^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   rf   rn   $N)r  r    r   )r  r   rf   )r   r   r4   r5   r!   r<   r   r:   r   r   assertIsNoneparentpathr   relative_pathabsolute_path	json_pathr;   relative_schema_pathabsolute_schema_pathcontextsorted_errorsassertIsassertFalser(   r   r   r   r   ee1e2   &       r   
test_anyOfZ%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!,r+   c                	s^   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# )ro   rf   rk   ri   r  enumr  $.fooN)rf   r    rf   )r   r  ro   r&  )rf   r   r  ro   r&  )r   r   r4   r5   r!   r<   r   r:   r   r   r  r  r  r   r  r  r  r;   r  r  r  r  r  r  r   r$  r   	test_typeZ$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	
 	##:;	

 	$r+   c                	s   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# )ro   ru   r   quuxZspamr  rf   rn   r   r   r&  $.barz$.bazr'  N)r      i   i   )r   r   r5   r  r!   r  r   r  r  r  r   )	r(   r   r   r   r   r"  r#  e3e4s	   &        r   test_single_nestingZ.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.r+   c                	s
   ^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   ro   ru   r   r)  rf   rn   r   ri   r  r&  rh   r   Tr   r  $[0]z$[1].barz$[1].bar.barz$[1].bar.bazz$[1].fooN)r   ru   ru   )r   ru   r   )r   r  ru   rf   )r   r  ru   r  ru   r   )r   r  ru   r  r   r   )r   r  ro   r&  )r   r   r5   r  r!   r  r   r  r;   r4   r   )r(   r   r   r   r   r"  r#  r,  r-  Ze5Ze6s   &          r   test_multiple_nestingZ0TestValidationErrorDetails.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.r+   c                	s   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# )definitionsZnoder  rf   ri   r   r   childrenr  rn   r   ^.*$r   z#/definitions/noderootrK   abz$.rootz$.root.children.az$.root.children.a.children.abN)r  r4  r  )r4  r2  rK   )	r  r4  r  r    r  r2  r   r3  r  )r4  r2  rK   r2  r5  )r  r4  r  r    r  r2  r   r3  r  r    r  r2  r   r3  r  )	r   r   r5   r!   r  r   r  r  r  )r(   r   r   r   r!  r"  r#     &      r   test_recursiveZ)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Gr+   c                	s   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# )	ru   ro   r   rf   rk   r   r*  r'  N	r   r   r5   r  r!   r  r   r  r   r(   r   r   r   r   r"  r#  r6  r   test_additionalPropertiesZ4TestValidationErrorDetails.test_additionalProperties  s    5%+(69i*KL..v6	&&x0v&%.1%.1w/w/v.y1r+   c                	s
   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# )	ru   ro   r   rf   rn   r   r*  r'  Nr8  r9  r6  r   test_patternPropertiesZ1TestValidationErrorDetails.test_patternProperties  s    1eQ')	1~"
 ..v6	&&x0v&%.1%.1w/w/v.y1r+   c                	s   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# )	ro   r   r   rf   rk   r   r/  $[1]Nr8  r9  r6  r   test_additionalItemsZ/TestValidationErrorDetails.test_additionalItems  s    1:R	9a@

 ..v6	&&x0v&%*-%*-v.v.v.y1r+   c                	s   . 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# )
ro   r   r   rf   rk   r   r<  z$[2]N)ro   ru   r   r8  r9  r6  r   test_additionalItems_with_itemsZ:TestValidationErrorDetails.test_additionalItems_with_items  s    $bT	9a@

 ..v6	&&x0v&%*-%*-v.v.v.y1r+   c                	s   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# )ro   ZpropertyNamesrs   rt   z0'foo' should not be valid under {'const': 'foo'}r  N
r   r   r5   r!   r   r   r  r   r  r;   )r(   r   r   r   errorr=   r   test_propertyNamesZ-TestValidationErrorDetails.test_propertyNames  s    2;!EGU+;#<=..v6	&&x0%0MM>	
 	U2Y/#.**E?E2J,KLr+   c                	s   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# )ifrt   Zthen13 was expectedr  Nr?  r(   r   r   r@  r7   r   test_if_thenZ'TestValidationErrorDetails.test_if_then      7B-WbM

 ..v6	&&r*'2(9:U2Y/#.**E672C,DEr+   c                	s   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# )rB  rt   ZelserC  r  Nr?  rD  r7   r   test_if_elseZ'TestValidationErrorDetails.test_if_else  rF  r+   c                	s6   \         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   r5   r!   r   r   r:   r   r   r;   r  r   )r(   r   r@  ra   r   test_boolean_schema_FalseZ4TestValidationErrorDetails.test_boolean_schema_False  s    ..u5	&&r*%%!! 1b		
r+   c                	s   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# )ZsomeRefr   rf   rk   r   rV   storeresolverro   ZnotAnIntegerz''notAnInteger' is not of type 'integer'r'  N)r   r   _RefResolverr5   r!   r   r   r:   r   r  r   r;   r  r   )r(   refr   r   r@  r=   r   test_refZ#TestValidationErrorDetails.test_ref'  s    "869:M!NV..SM,,RC=I
	 &&~'>?%%##!!	 :ug#-v67		
r+   c                	s   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# )r   rf   rn   r   r   r/  z"5 is greater than the maximum of 3$[3]Nr   )r   r    rf   )r   r   r   r   rv   r5   r!   r   r   r:   r   r  r   r;   r  r   )r(   r   r   Z
type_errorZ	min_errorr=   r   test_prefixItemsZ+TestValidationErrorDetails.test_prefixItemsF  sY   68"4b"y!n!MN33F;	 ) 5 56F G
""$$**##((!!&&$$	 ,qc
"01		
, 	!!##))""''  %%##	 5qc
A34		
r+   c                	s   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   rf   rn   r   z2 is not of type 'string'r<  z4 is not of type 'string'rP  N)ro   r   ru   r+  r   rQ  r(   r   r   r"  r#  r=   r   r   Z6TestValidationErrorDetails.test_prefixItems_with_itemsw  sG   fh'B4
 33F;	&&'BC

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

""  			 ,qc
"w'(		
r+   c                s   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   rf   rn   r   r   r  N)ro   r   ru   r+  r   r)  rQ  rD  r7   r   r   Z1TestValidationErrorDetails.test_contains_too_many  s    
 vx0-C33F;	&&'JK%%##!!	 M3b	fh/Bzl#		
r+   c                	s   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   rf   rn   r   r   r  N)ro   r   r+  rQ  rD  r7   r   r   Z0TestValidationErrorDetails.test_contains_too_few  s    vx0-C33F;	&&}5%%##!!	? b	fh/Bzl#	
r+   c                	s   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   rf   rn   r   z7[2, 4] does not contain items matching the given schemar  NrQ  rD  r7   r   test_contains_noneZ-TestValidationErrorDetails.test_contains_none  s    vx0-C33F;	&&1v.%%##!!	 J"Ab	fh/Bzl#		
r+   c                	s   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   ro   r   ru   r  apropr   z#/$defs/foor   z'bar' is a required propertyz$.apropz'baz' is a required propertyN)r  rU  r   )r   rv   r5   r!   r   r   r:   r   r  r   r;   r  r  r   rS  r=   r   test_ref_siblingZ+TestValidationErrorDetails.test_ref_sibling  s   ej5'23M
 33F;	&&}5

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

""  		''
 /wi 
UG<9:9:
	
r+   r   N)rE   r   rF   r   r%  r(  r.  r0  r7  r:  r;  r=  r>  rA  rE  rG  rH  rO  rR  r   r   r   rT  rV  r   r   r+   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<
r+   r  c                  s:    ] tR tRtR tR tR tR tR tR t	Rt
R	# )
MetaSchemaTestsMixiniB  c                	s    V P                  \        P                  4      ;_uu_ 4        V P                  P	                  R ^/4       RRR4       R#   + '       g   i     R# ; i)r  Nrx   r   ry   r&   rw   r'   r)   r   test_invalid_propertiesZ,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)r   1NrX  r'   r)   r   test_minItems_invalid_stringZ1MetaSchemaTestsMixin.test_minItems_invalid_stringH  s?    z5566NN''S(9: 7666rZ  c                sd   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   rx   r   ry   rw   r'   r)   r   test_enum_allows_empty_arraysZ2MetaSchemaTestsMixin.test_enum_allows_empty_arraysM  s     >>&&&&
 
 "":#9#9::++VRL9 ;: NN''5 ;::s   BB/	c                sl   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'   r)   r   !test_enum_allows_non_unique_itemsZ6MetaSchemaTestsMixin.test_enum_allows_non_unique_items^  s     >>&&&&
 
 "":#9#9::++Vb"X,>? ;: NN''"b(:; ;::s    B""B3	c                	r[  )r   
*notaregexNrX  r'   r)   r   test_schema_with_invalid_regexZ3MetaSchemaTestsMixin.test_schema_with_invalid_regexo  s?    z5566NN''L(AB 7666rZ  c                	sD    V P                   P                  R R/RR7       R# )r   ra  Nr   )r&   rw   r'   r)   r   >test_schema_with_invalid_regex_with_disabled_format_validationZSMetaSchemaTestsMixin.test_schema_with_invalid_regex_with_disabled_format_validations  s$    ##% 	$ 	
r+   r   N)rE   r   rF   r   rY  r]  r_  r`  rb  rd  r   r   r+   r   rW  rW  B  s!    <;
6"<"C
r+   rW  c                  s    ] 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                	sd    V P                  V P                  / 4      \        P                  4       R # r,   )assertIsInstancer&   r   r'   r)   r   )test_it_implements_the_validator_protocolZ<ValidatorTestMixin.test_it_implements_the_validator_protocol{  s!    dnnR0)2E2EFr+   c                	    V P                   w  rV P                  V P                  V4      P                  V4      4       R # r,   )validrp   r&   r   r(   r   r   ra   r   test_valid_instances_are_validZ1ValidatorTestMixin.test_valid_instances_are_valid~  s.    ::v.77ABr+   c                	rh  r,   )invalidr  r&   r   rj  ra   r   $test_invalid_instances_are_not_validZ7ValidatorTestMixin.test_invalid_instances_are_not_valid  s0    <</88BCr+   c                	s|    V P                  \        4       \        4       /4      P                  \        4       R 7       R# ))r   N)r&   ri   rz   r'   r)   r   (test_non_existent_properties_are_ignoredZ;ValidatorTestMixin.test_non_existent_properties_are_ignored  s'    &(+,55vx5Hr+   c                	sD   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# )rf   rk   rc  rn   )r   r   )r   	_resolverN)r   r&   evolveZFORMAT_CHECKERro  r!   ZassertNotEqual)r(   r   r   rQ   r~   Zexpected   &     r   test_evolveZValidatorTestMixin.test_evolve  s    "()!4mo>>) " 
 ooH%>>88  

 >>X>>88mm " 
 	'C*r+   c                s   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                  s<    ] tR tRt]! R R7      t]! ^%R7      tRtR# ):ValidatorTestMixin.test_evolve_with_subclass.<locals>.OhNoi  c                 	s
    . RO# )r   r   r   r   r+   r   rZ   ZCValidatorTestMixin.test_evolve_with_subclass.<locals>.OhNo.<lambda>  s    Ir+   )Zfactorydefaultr   N)rE   r   rF   r   r   ro   _barr   r   r+   r   OhNors    s    $56R(r+   rw  N)ru   rf   rk   r   r   )assertWarnsDeprecationWarningr   r&   r!   ro   rp  rv  )r(   rw  r   r~   r7   r   test_evolve_with_subclassZ,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# )ro   rn   N)rp   r&   rg   r'   r)   r   #test_is_type_is_true_for_valid_typeZ6ValidatorTestMixin.test_is_type_is_true_for_valid_type  s$    r*225(CDr+   c                	r|  )ro   rh   Nr  r&   rg   r'   r)   r   &test_is_type_is_false_for_invalid_typeZ9ValidatorTestMixin.test_is_type_is_false_for_invalid_type  s&    +33E7CDr+   c                	s    V P                  V P                  / 4      P                  R R4      4       V P                  V P                  / 4      P                  R R4      4       R# )Trk   rm   Nr~  r'   r)   r   ,test_is_type_evades_bool_inheriting_from_intZ?ValidatorTestMixin.test_is_type_evades_bool_inheriting_from_int  sJ    +33D)DE+33D(CDr+   c                	s   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   rf   rm   c                sr    \        V\        \        \        34      ;'       d    \        V\        4      '       * # r,   )
isinstanceintZfloatr   Zboolr   r      &&r   rZ   ZGValidatorTestMixin.test_it_can_validate_with_decimals.<locals>.<lambda>  s1    zC0( (2 (2$UD11(2r+   r   g?ro   TN)
r   r   r&   r/   redefinerz   r   r!   r5   r   )r(   r   r&   r   rl  r@  rq  r   "test_it_can_validate_with_decimalsZ5ValidatorTestMixin.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                	sb    V P                  R R/\        4       R7      pVP                  R4       R# )r   Zcarrotrc  ZbugsN)r&   r   rz   r(   r   r2   r   7test_it_returns_true_for_formats_it_does_not_know_aboutZJValidatorTestMixin.test_it_returns_true_for_formats_it_does_not_know_about  s1    NNx  # 
	 	6"r+   c                	s^    V P                  / 4      pV P                  VP                  4       R # r,   )r&   r  r   r  r2   r   ,test_it_does_not_validate_formats_by_defaultZ?ValidatorTestMixin.test_it_does_not_validate_formats_by_default  s$    NN2&	)223r+   c                	s  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!ro   )Zraisesc                sV   < 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   )r   r  r(      &r   checkZTValidatorTestMixin.test_it_validates_formats_if_a_checker_is_provided.<locals>.check  s/    %			HUG+ABCr+   r   rc  r  r  N)r   
ValueErrorr   r&   rz   rx   r   r   r  	exceptionZcause)r(   r   r  r   cmr  s   f    @r   2test_it_validates_formats_if_a_checker_is_providedZEValidatorTestMixin.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                	s    \        4       pR V./p\        P                  ! V P                  V P                  P                  P                  VR 4      R7      pV! V4      P                  ^4       R# )rf   c                "    \        V\        4      # r,   r  r  r  r  r   rZ   Z@ValidatorTestMixin.test_non_string_custom_type.<locals>.<lambda>  s    z%'=r+   r  N)ri   r   r   r&   r/   r  rz   )r(   Znon_string_typer   Crazyr7   r   test_non_string_custom_typeZ.ValidatorTestMixin.test_non_string_custom_type  s_     (?+,!!NN44===
 	fr"r+   c                s   \         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
rh   c                r  r,   )r  Ztupler  r  r   rZ   ZNValidatorTestMixin.test_it_properly_formats_tuples_in_errors.<locals>.<lambda>  s    z%'?r+   r  uniqueItemsTNz(1, 1) has non-unique elements)r   r   )r   r   r&   r/   r  rx   r   r   rz   r_   strr  )r(   ZTupleValidatorr!  ra   r   )test_it_properly_formats_tuples_in_errorsZ<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                s  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
rf   rh   r  T	MyMappingza, bc                s.    \        V\        \        34      # r,   )r  r4   r   r  r  r   rZ   BValidatorTestMixin.test_check_redefined_sequence.<locals>.<lambda>  s    Je}5r+   ri   c                s(   < \        V\        S34      # r,   )r  r#   )r   r   r     &&r   rZ   r    s    Zi06r+   r  rK   NF)rK   Nr\  rV   T)rK   r   rK   )r   r   r   r&   r/   Zredefine_manyr   rz   rx   r   r   )r(   r   r&   r   Zvalid_instancesr   Zinvalid_instancesr  s   &      @r   test_check_redefined_sequenceZ0ValidatorTestMixin.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                	s    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r,   )ry  rz  r&   rL  rf  r   rM  )r(   rL  r2   r   .test_it_creates_a_ref_resolver_if_not_providedZAValidatorTestMixin.test_it_creates_a_ref_resolver_if_not_providedT  sL    011~~b)22H 2h
(?(?@ 21s   A$$A4	c                	s   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)someCoolRefrf   rk   rV   rI  r   rK  N)r   rM  r&   rx   r   r   rz   r(   rN  r   rL  r   r=   r   /test_it_upconverts_from_deprecated_RefResolversZBValidatorTestMixin.test_it_upconverts_from_deprecated_RefResolversY  sn    #fi%8V**2r#GNNFC=8ND	z99::t$ ;:::s   A88B		c                s  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                  s.   < ] 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@   <"   SP                  VR 4       RR/x  R# 5i)the refrf   rk   Nr!   )ZthisrN  r(   r  r   	resolvingZxValidatorTestMixin.test_it_upconverts_from_yet_older_deprecated_legacy_RefResolvers.<locals>.LegacyRefResolver.resolvingh  s!       i0y))s   r   N)rE   r   rF   r   r   r  r   r'      r   LegacyRefResolverr  g  s    * *r+   r  r   r  rK  N)rx   r   r   r&   rz   )r(   r  rL  r   s   f   r   @test_it_upconverts_from_yet_older_deprecated_legacy_RefResolversZSValidatorTestMixin.test_it_upconverts_from_yet_older_deprecated_legacy_RefResolversa  s`    	* 	* %&)$z99::NN6N5>>tD ;:::s   "A--A>	r   N)rE   r   rF   r   rg  rk  rm  rn  rr  r{  r}  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r+   r   re  re  z  sm    GCDI+('.EEE
*#4/0
#J"@-DA
%Er+   re  c                  s2    ] 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rx   r   ry   r&   rw   r_   r  r  r(   r!  r2   r   test_True_is_not_a_schemaZ-AntiDraft6LeakMixin.test_True_is_not_a_schemay  sS    z5566!NN''- 7+S-=> 76   A33B	c                	r  )FNzFalse is not of typer  r  r2   r   test_False_is_not_a_schemaZ.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rx   Z	Exceptionr&   rz   ZassertNotIsInstancer  r   r   r  r2   r   5test_True_is_not_a_schema_even_if_you_forget_to_checkZIAntiDraft6LeakMixin.test_True_is_not_a_schema_even_if_you_forget_to_check  sT    y))QNN4 ))"- *  j.H.HI *)   !A33B	c                	r  FNr  r  r2   r   6test_False_is_not_a_schema_even_if_you_forget_to_checkZJAntiDraft6LeakMixin.test_False_is_not_a_schema_even_if_you_forget_to_check  sT    y))QNN5!**2. *  j.H.HI *)r  r   N)
rE   r   rF   r   __doc__r  r  r  r  r   r   r+   r   r  r  t  s    ?
@
J
Jr+   r  c                  sf    ] 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]ri  rf   rk   ro   c                	s^    V P                  R R/4      pVP                  \        4       4       R# rf   anyN)r&   rz   ri   r  r2   r   #test_any_type_is_valid_for_type_anyZ7TestDraft3Validator.test_any_type_is_valid_for_type_any  s$    NNFE?3	68$r+   c                st   \         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                r  r,   r  r  r  r   rZ   ZBTestDraft3Validator.test_any_type_is_redefinable.<locals>.<lambda>  s    j.Dr+   r  rf   ro   N)	r   r   r&   r/   r  rz   rx   r   r   )r(   r  r   ra   r   test_any_type_is_redefinableZ0TestDraft3Validator.test_any_type_is_redefinable  s     !!NN44==D
 65/*	2z99::u% ;:::s   
B&&B7	c                	sx    V P                  V P                  R R/4      P                  \        4       4      4       R# r  )rp   r&   r   ri   r'   r)   r   !test_is_type_is_true_for_any_typeZ5TestDraft3Validator.test_is_type_is_true_for_any_type  s(    7@@JKr+   c                	s    V P                  V P                  / 4      P                  R R4      4       V P                  V P                  RR/4      P                  R 4      4       R# )Trj   rf   r  N)rp   r&   rg   r   r'   r)   r   6test_is_type_does_not_evade_bool_if_it_is_being_testedZJTestDraft3Validator.test_is_type_does_not_evade_bool_if_it_is_being_tested  sH    r*224CD7@@FGr+   r   N)rE   r   rF   r   r   r   r&   ri  __annotations__rl  r  r  r  r  r   r   r+   r   r  r    sA    **I "BxE'y!5(G%&LHr+   r  c                  N    ] tR tRt$ ]P
                  t/ / 3tR]R&   RR/R3t	Rt
R# )	TestDraft4Validatori  r  ri  rf   rk   ro   r   N)rE   r   rF   r   r   r   r&   ri  r  rl  r   r   r+   r   r  r    +    **I "BxE'y!5(Gr+   r  c                  r  )	TestDraft6Validatori  r  ri  rf   rk   ro   r   N)rE   r   rF   r   r   r   r&   ri  r  rl  r   r   r+   r   r  r    r  r+   r  c                  r  )	TestDraft7Validatori  r  ri  rf   rk   ro   r   N)rE   r   rF   r   r   r   r&   ri  r  rl  r   r   r+   r   r  r    r  r+   r  c                  r  )	TestDraft201909Validatori  r  ri  rf   rk   ro   r   N)rE   r   rF   r   r   Draft201909Validatorr&   ri  r  rl  r   r   r+   r   r  r    +    //I "BxE'y!5(Gr+   r  c                  r  )	TestDraft202012Validatori  r  ri  rf   rk   ro   r   N)rE   r   rF   r   r   rv   r&   ri  r  rl  r   r   r+   r   r  r    r  r+   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                	s    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   rV   FrI  rK  N)r   rM  r   rx   r   r   rz   r  r=   r   2test_ref_resolvers_may_have_boolean_schemas_storedZFTestLatestValidator.test_ref_resolvers_may_have_boolean_schemas_stored  sl    #**2r#uF..vI	z99::t$ ;:::s    A<<B	r   N)rE   r   rF   r   r  r  r   r   r+   r   r  r    s    %r+   r  c                  sp    ] 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# )rr   &http://json-schema.org/draft-03/schema'http://json-schema.org/draft-03/schema#N)r  r   validator_forr   r1   r2   r   test_draft_3ZTestValidatorFor.test_draft_3  `    EF$$V,&&	

 FG$$V,&&	
r+   c                	r  )rr   &http://json-schema.org/draft-04/schema'http://json-schema.org/draft-04/schema#N)r  r   r  r   r1   r2   r   test_draft_4ZTestValidatorFor.test_draft_4  r  r+   c                	r  )rr   &http://json-schema.org/draft-06/schema'http://json-schema.org/draft-06/schema#N)r  r   r  r   r1   r2   r   test_draft_6ZTestValidatorFor.test_draft_6  r  r+   c                	r  )rr   &http://json-schema.org/draft-07/schema'http://json-schema.org/draft-07/schema#N)r  r   r  r   r1   r2   r   test_draft_7ZTestValidatorFor.test_draft_7  r  r+   c                	r  )rr   z,https://json-schema.org/draft/2019-09/schemaz-https://json-schema.org/draft/2019-09/schema#N)r  r   r  r  r1   r2   r   test_draft_201909Z"TestValidatorFor.test_draft_201909  `    KL$$V,++	

 LM$$V,++	
r+   c                	r  )rr   ,https://json-schema.org/draft/2020-12/schema-https://json-schema.org/draft/2020-12/schema#N)r  r   r  rv   r1   r2   r   test_draft_202012Z"TestValidatorFor.test_draft_202012  r  r+   c                	n    V P                  \        P                  ! R 4      \        P                  4       R# r  r  r   r  r   r'   r)   r   	test_TrueZTestValidatorFor.test_True*  s%    $$T*&&	
r+   c                	r  r  r  r'   r)   r   
test_FalseZTestValidatorFor.test_False0  s%    $$U+&&	
r+   c                	s    \         P                  ! R R/RR R7      pRR/pV P                  \         P                  ! V4      V4       R# )rP   rS   Z12c                rT   rU   rW   rY   r)   r   rZ   Z8TestValidatorFor.test_custom_validator.<locals>.<lambda>:  r[   r+   r\   rr   Nr   r%   r  r  r(   r&   r   ra   r   test_custom_validatorZ&TestValidatorFor.test_custom_validator6  sK    %%/0+
	
 -.$$V,	
r+   c                	s    \         P                  ! R R/RR7      pRR/pV P                  \         P                  ! V4      V4       R# )r   rc   Z13rB   rr   Nr  r  ra   r   test_custom_validator_draft6Z-TestValidatorFor.test_custom_validator_draft6B  sH    %% 12
	 ./$$V,	
r+   c                	sn    V P                  \        P                  ! / 4      \        P                  4       R # r,   r  r'   r)   r   %test_validator_for_jsonschema_defaultZ6TestValidatorFor.test_validator_for_jsonschema_defaultM  s!    j..r2J4N4NOr+   c                	sV    V P                  \        P                  ! / R R7      R 4       R # )Nrt  )r  r   r  r'   r)   r   !test_validator_for_custom_defaultZ2TestValidatorFor.test_validator_for_custom_defaultP  s    j..r4@$Gr+   c                	s4   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)rr   ZunknownSchemarx  NzThe metaschema specified by $schema was not found. Using the latest draft to validate, but this will raise an error in the future.)	ry  rz  r   r  r!   ZfilenameZ__file__r  Zwarning)r(   r  r2   r   1test_warns_if_meta_schema_specified_was_not_foundZBTestValidatorFor.test_warns_if_meta_schema_specified_was_not_foundS  sk    011R$$Y,HI 2 	h/

O&	
	 21s   BB	c                	s    \         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Zrecordalways)r   ru  N)warningscatch_warningssimplefilterr   r  r  )r(   wr2   r   0test_does_not_warn_if_meta_schema_is_unspecifiedZATestValidatorFor.test_does_not_warn_if_meta_schema_is_unspecified_  sQ    $$D11Q!!(+$$B; 2 	 21s   /A**A:	c                	sl    R R/\        4       r!V P                  \        P                  ! W4      V4       R# )rr   zmailto:foo@example.comN)ri   r  r   r  )r(   r   ru  ra   r   -test_validator_for_custom_default_with_schemaZ>TestValidatorFor.test_validator_for_custom_default_with_schemae  s*    $&>?j..v?Ir+   r   N)rE   r   rF   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r   r+   r   r  r    sP    









	
PH

Jr+   r  c                  sR    ] 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                	s    . 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)rw   N)r	   patchri   appendr   rz   r!   )r(   r   r&   Zresults   &&& r   
assertUsesZ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# )rr   r  r   r&   r  N)r  r   r   r'   r)   r   test_draft3_validator_is_chosenZ,TestValidate.test_draft3_validator_is_chosenq  J    HI 00 	 	

 	GH 00 	 	
r+   c                	r  )rr   r  r  r  N)r  r   r   r'   r)   r   test_draft4_validator_is_chosenZ,TestValidate.test_draft4_validator_is_chosen|  r  r+   c                	r  )rr   r  r  r  N)r  r   r   r'   r)   r   test_draft6_validator_is_chosenZ,TestValidate.test_draft6_validator_is_chosen  r  r+   c                	r  )rr   r  r  r  N)r  r   r   r'   r)   r   test_draft7_validator_is_chosenZ,TestValidate.test_draft7_validator_is_chosen  r  r+   c                	r  )rr   r  r  r  Nr  r   rv   r'   r)   r   $test_draft202012_validator_is_chosenZ1TestValidate.test_draft202012_validator_is_chosen  sR    J !55	 	 	
 	I !55	 	 	
r+   c                	sH    V P                  / \        P                  R 7       R# )r  Nr   r'   r)   r   )test_draft202012_validator_is_the_defaultZ6TestValidate.test_draft202012_validator_is_the_default  s    rZ-L-LMr+   c                	s   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)rl   rf   rn   Nz1(?s)Failed validating '.*' in schema.*On instance)rx   r   r   r   rz   assertRegexr  r  r  r2   r   test_validation_error_messageZ*TestValidate.test_validation_error_message  s[    z99::aVX$67 ;?	
 ;:   A11B	c                	s   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)rl   rf   Nz3(?s)Failed validating '.*' in metaschema.*On schema)rx   r   ry   r   rz   r  r  r  r  r2   r   test_schema_error_messageZ&TestValidate.test_schema_error_message  sZ    z5566!VRL1 7A	
 76r  c                	s   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   rf   rm   r   rh   Nz!12 is less than the minimum of 20)rx   r   r   r   rz   r_   r  r  )r(   r   r!  ra   r   test_it_uses_best_matchZ$TestValidate.test_it_uses_best_match  sv    9b1!
 z99::aF+ ;93q{{;KL ;:s   A;;B	r   N)rE   r   rF   r   r  r  r  r  r  r  r  r  r  r  r   r   r+   r   r  r  j  s6    +	
	
	
	

N

	Mr+   r  c                  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                	s   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                 s   <  \         P                  ! ^%RR7       R#    S P                  \        P                  ! 4       4        R# ; i)r	  Tr   N)r   rz   r  sysZexc_info)failedr  r   rz   ZFTestThreading.test_validation_across_a_second_thread.<locals>.validate  s1    .##R=.clln-s	    &A)Thread)ZtargetFN)Z	threadingr  ZstartZjoinr!   Zis_alive)r(   rz   r  Zthreadr
  s   &   @r   &test_validation_across_a_second_threadZ4TestThreading.test_validation_across_a_second_thread  sS    	. 	
$x(&//+V4ubkBr+   r   N)rE   r   rF   r   r  r  r   r   r+   r   r  r    s    
Cr+   r  c                  s"    ] tR tRtR tR tRtR# )TestReferencingi  c                	s    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                s2    \         P                  ! R R/4      # )rf   rk   )r   Zcreate_resource)urir)   r   retrieveZ=TestReferencing.test_registry_with_retrieve.<locals>.retrieve  s    ..	/BCCr+   )r  r   https://example.com/registryro   N)TF)referencingRegistryr   rv   r!   r   )r(   r  r  r   r   r=   r   test_registry_with_retrieveZ+TestReferencing.test_registry_with_retrieve  sd    	D '':0133FN	#Y%7%7%>?	
r+   c           	     	s   \         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  Tr  r  N)r  r  r   rv   r  r  r  rx   r   ZUnresolvablerz   r  )r(   r  r   r   r  r=   r   ;test_custom_registries_do_not_autoretrieve_remote_resourcesZKTestReferencing.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)rE   r   rF   r   r  r  r   r   r+   r   r  r    s    
	r+   r  c                  s    ] 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	  rV   zfoo://storedZstoredr   c                	s    / V n         V P                  V P                  /V n        \        P
                  ! V P                  V P                   V P                  4      V n        R # r,   )referrer
stored_uristored_schemarJ  r   rM  base_urirL  r'   r)   r   r*   ZTestRefResolver.setUp
	  sD    oot'9'9:
"//MM4==$**
r+   c           	     	s   \         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)rP   Zresolve_remoteN)r   r   r.   r	   r  ri   rL  r  r!   r  Zcalled)r(   rN  Zpatchedresolvedr7   r   6test_it_does_not_retrieve_schema_urls_from_the_networkZFTestRefResolver.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                	s   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/fooro   r  N)ri   r  rL  r  r!   )r(   rN  r  ra   r   test_it_resolves_local_refsZ+TestRefResolver.test_it_resolves_local_refs	  s^     ',fh&7l#]]$$S))XX}}\'B5'IJ *)))s   *A33B	c                	s   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)
rP   zhttp://bar/schema#rK   ro   ru   c                rT   rU   rW   rx  r)   r   rZ   ZETestRefResolver.test_it_resolves_local_refs_with_id.<locals>.<lambda>#	      D"!5r+   r]   z#/aNzhttp://bar/schema#/a)r   rM  from_schemar  r!   r(   r   rL  r  r7   r   #test_it_resolves_local_refs_with_idZ3TestRefResolver.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                	s   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)Nro   Z
cached_refzcached_ref#/foo)rL  r  r  r  r  rJ  r!   )r(   r  r2   r   test_it_retrieves_stored_refsZ-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                	s   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__ReallyFakeRequestsrL  r  r!   )r(   rN  r   r  r7   r   ,test_it_retrieves_unstored_refs_via_requestsZ<TestRefResolver.test_it_retrieves_unstored_refs_via_requests2	  s    $OO''S[[5L #5lF5K"LJ]]$$S))XXr* *)))s   B::C	c                	s  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S P                  \
        \        R\        P                  4       V\        n        S P                  P                  V4      ;_uu_ 4       p RRR4       S P                  X^4       R#   + '       g   i     L$; i)r%  r   r&  Nc              3  s   <"   SP                  V R 4       \        \        P                  ! S4      P	                  R4      4      x  R# 5i)r'  Zutf8N)r!   r   jsondumpsZencode)urlr   r(   r  r   fake_urlopenZQTestRefResolver.test_it_retrieves_unstored_refs_via_urlopen.<locals>.fake_urlopenI	  s5     S,/$**V,33F;<<s   AAurlopen)r	  r(  r    r)  r   Zsetattrr   r0  rL  r  r!   )r(   rN  r/  r  r      f   @r   +test_it_retrieves_unstored_refs_via_urlopenZ;TestRefResolver.test_it_retrieves_unstored_refs_via_urlopen?	  s    $OO''S[[5L #'J		= 
	= 	Y
8J8JK)
]]$$S))X *2& *)s   C77D	c                	s   \         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)FZwt)ZdeleteZmodero   ru   Nzfile://z#foo)tempfileZNamedTemporaryFiler    osZremover   r,  Zdumpr
   rL  r  r!   )r(   ZtempfrN  r  r7   r   (test_it_retrieves_local_refs_via_urlopenZ8TestRefResolver.test_it_retrieves_local_refs_via_urlopenU	  s    ((DAAUOOBIIuzz2IIuene, B UZZ016]]$$S))XXu- *) BA
 *))s   AC)CC	C*	c                	s   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)rP   ro   c                rT   rU   rW   rx  r)   r   rZ   ZPTestRefResolver.test_it_can_construct_a_base_uri_from_a_schema.<locals>.<lambda>b	  r  r+   r   rV   N#zfoo#r   rM  r!  r!   r  Zresolution_scoper  r"  r7   r   .test_it_can_construct_a_base_uri_from_a_schemaZ>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                	s   / 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)rV   Nr6  r7  r"  r7   r   9test_it_can_construct_a_base_uri_from_a_schema_without_idZITestRefResolver.test_it_can_construct_a_base_uri_from_a_schema_without_ido	  s    **66v>**B/22B7##xX. $$$X. %$ $#$$$s   3C&CC	C&	c                	s   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,   < SP                  V S4       S# r,   r  )r.  rN  r   r(   s   &r   handlerZ@TestRefResolver.test_custom_uri_scheme_handlers.<locals>.handlerz	  s    S#&Mr+   ro   ru   	foo://barrV   handlersN)r   rM  r  r!   )r(   r:  rL  r  rN  r   s   f   @@r   test_custom_uri_scheme_handlersZ/TestRefResolver.test_custom_uri_scheme_handlersy	  sc    	 **2rUG<LM$$Xv. %$$$s   A##A4	c                	sD  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rD   Z
IndexErrorr   r.  responser(   r  r   r:  Z5TestRefResolver.test_cache_remote_on.<locals>.handler	  s3    A||~% A		?@A    33r;  rV   Tro   Zcache_remoter=  Nri   r   rM  r  r(   r:  rN  rL  rB  r1  r   test_cache_remote_onZ$TestRefResolver.test_cache_remote_on	  s    H:	A **0@
 $$ %$$ %$ %$$$$s   A;/B;B	B	c                	s   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                r?  )zHandler called twice!Nr@  rA  r  r   r:  Z6TestRefResolver.test_cache_remote_off.<locals>.handler	  s0    3||~% 3		123rC  r;  rV   Fro   rD  NrE  rF  r1  r   test_cache_remote_offZ%TestRefResolver.test_cache_remote_off	  s[    H:	3 **%1A
 $$ %$$$s   AA)	c           	     	s  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   < Shr,   r   )r.  r@  r   r   r:  ZTTestRefResolver.test_if_you_give_it_junk_you_get_a_resolution_error.<locals>.handler	  s    Kr+   r;  rV   ro   r<  zShouldn't get this far!N)
r  r   rM  rx   r   _RefResolutionErrorr  r   r!   r  )r(   r:  rN  rL  Zerrr@  s   &    @r   3test_if_you_give_it_junk_you_get_a_resolution_errorZCTestRefResolver.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                	sD   \         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)rV   NzFailed to pop the scope)	r   rM  Z	pop_scoperx   r   rI  r_   r  r  )r(   rL  Zexcra   r   .test_helpful_error_message_on_failed_pop_scopeZ>TestRefResolver.test_helpful_error_message_on_failed_pop_scope	  sk    **2r2z==>>#  ?/S]]1CD ?>s   BB	c                s   \         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.
rV   rK  r   ro   ZallOfr   r   N)r   r   r.   rM  r  r   )r(   r   Zoner   ZanotherZtworq  r   ,test_pointer_within_schema_with_different_idZ<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Br+   c                s,  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                s0   < SP                  V R 4       RR/# )zhttp://example.com/foorf   rk   r  )r  r(   r   r   handleZNTestRefResolver.test_newly_created_validator_with_ref_resolver.<locals>.handle	  s    S":;I&&r+   rV   Zhttpr<  re   r   zhttp://example.com/barr   ro   rK  NFT)r   rM  r%   r   r-   r!   r   )r(   rM  rL  r&   r   r   r   r   .test_newly_created_validator_with_ref_resolverZ>TestRefResolver.test_newly_created_validator_with_ref_resolver	  s    
	' **2rVV<LM%%!11<<
	 165Af8	#Y%7%7%;<	
r+   c                s    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  Zxr   z#/definitions/xr1  rf   rk   rV   rK  ZyNrN  )r   rv   rM  r!   r   )r(   r   r   ra   r   2test_refresolver_with_pointer_in_schema_with_no_idZBTestRefResolver.test_refresolver_with_pointer_in_schema_with_no_id	  s     3): ;<C&)!45

 33,,R8
	 	c
+Y-?-?b	-JK	
r+   )r  rL  rJ  N)rE   r   rF   r   r  r  r  r*   r  r  r#  r$  r+  r2  r5  r8  r9  r>  rG  rH  rJ  rK  rL  rO  rP  r   r   r+   r   r  r  	  st    HJx(M
)K	4++',./"/	/$ OEC 
*
r+   r  c                s     R  p\        WR7      # )c                s    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 r,   )r  r  r;   )r@  r!  r2   r   keyZsorted_errors.<locals>.key	  sJ    "ZZ(ZSVZ("../.SV./
 	
(/s
   AA)rQ  )Zsorted)r   rQ  r2   r   r  r  	  s    

 &""r+   c                  (    ] tR tRt$ R]R&   R tRtR# )r*  i	  zdict[str, Any]
_responsesc                	s    V P                   P                  V4      pVf   \        R\        V4      ,           4      h\	        \
        P                  ! V4      4      # )NzUnknown URL: )rS  rX   r  rI   _ReallyFakeJSONResponser,  r-  )r(   r.  rB  s   && r   rX   ZReallyFakeRequests.get
  sC    ??&&s+;_tCy899&tzz(';<<r+   r   N)rE   r   rF   r   r  rX   r   r   r+   r   r*  r*  	  s     =r+   r*  c                  rR  )rT  i	
  r  	_responsec                	sB    \         P                  ! V P                  4      # r,   )r,  ZloadsrU  r'   r)   r   r,  Z_ReallyFakeJSONResponse.json
  s    zz$..))r+   r   N)rE   r   rF   r   r  r,  r   r   r+   r   rT  rT  	
  s     N*r+   rT  ):Z
__future__r   Zcollectionsr   r   Z
contextlibr   Zdecimalr   Zior   Ztypingr   Zunittestr   r	   Zurllib.requestr
   r,  r4  r	  r3  r  Zattrsr   r   Zreferencing.jsonschemar   Zreferencing.exceptionsr  Z
jsonschemar   r   r   r   r   r   r   r   r  rW  re  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r*  rT  r   r+   r   <module>rV     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 4l
h l
`# = = = * * *r+   