+
    P4i~                       R t ^ 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Ht ^ RI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]'       d   ^ RIt^ R
IHt ^ RIt]P>                  ! R4      t R t!] ! R R4      4       t"] ! R R4      4       t#] ! R R4      4       t$]! RR7       ! R R4      4       t%R t&R# )z=
Python representations of the JSON Schema Test Suite tests.
)annotations)IterableMapping)suppress)partial)Path)TYPE_CHECKINGAnyN)fieldfrozen)Registry)_VALIDATORSz[\W\- ]+c                    \         P                  P                  R 4      p V e   \        V 4      # \        \        P
                  4      P                  P                  R,          p V P                  4       '       g   \        R4      hV # )JSON_SCHEMA_TEST_SUITEjsonzCan't find the JSON-Schema-Test-Suite directory. Set the 'JSON_SCHEMA_TEST_SUITE' environment variable or run the tests from alongside a checkout of the suite.)	osenvirongetr   
jsonschema__file__parentis_dir
ValueError)roots    9/usr/lib/python3/dist-packages/jsonschema/tests/_suite.py_find_suiter      sj    ::>>23DDz
##$++22V;D;;== 
 	
 K    c                  n    ] tR t^1t$ ]! ]R7      tR]R&   ]! RR7      tR]R&   R t	R	 R
 lt
R R ltRtR# )Suite)factoryr   _rootF)init%referencing.jsonschema.SchemaRegistry_remotesc           	     	   V P                   P                  R R4      p\        P                  \	        V4      R.p\
        P                  ! V4      P                  R4      p\        P                  ! V4      pRpRp\        4       P                  V\        P                  P                  P                  VP!                  V4      R7      3V\        P                  P"                  P                  VP!                  V4      R7      3.4      P%                  VP'                  4       \        P                  P(                  R7      p\*        P-                  V RV4       R	# )
binjsonschema_suiteremotesutf-8z?http://localhost:1234/locationIndependentIdentifierPre2019.jsonz>http://localhost:1234/locationIndependentIdentifierDraft4.json)contents)default_specificationr#   N)r    joinpathsys
executablestr
subprocesscheck_outputdecoder   loadsr   with_resourcesreferencingr   DRAFT7create_resourcepopDRAFT4with_contentsitemsDRAFT202012object__setattr__)selfr&   argvr'   	resourceslili4registrys   &       r   __attrs_post_init__Suite.__attrs_post_init__7   s'   ::..u6HI$4 5yA))$/66w?JJw'	NN:,, **11AA!*r!2 B  **11AA!*s!3 B 
 -OO"-"8"8"D"D  
 	& 	4X6r   c                   V ^8  d   QhRR/#    runnerzpyperf.Runner )formats   "r   __annotate__Suite.__annotate__V          r   c                	    \         P                  ! 4        F(  w  r#V P                  VR 7      P                  VVR7       K*  	  R# ))name)rI   	ValidatorN)r   r:   version	benchmark)r>   rI   rP   rQ   s   &&  r   rS   Suite.benchmarkV   s;    *002ODLLdL#--# .   3r   c                   V ^8  d   QhRR/# )rH   returnVersionrJ   )rK   s   "r   rL   rM   ]   s     
 
w 
r   c                	b    \        VV P                  R ,          V,          V P                  R7      # )tests)rP   pathr'   )rW   r    r#   r>   rP   s   &&r   rR   Suite.version]   s*    g%,MM
 	
r   rJ   N)__name__
__module____qualname____firstlineno__r
   r   r    __annotations__r#   rD   rS   rR   __static_attributes__rJ   r   r   r   r   1   s7     ,E4,6;6GH3G7>
 
r   r   c                  r    ] tR t^et$ R]R&   R]R&   R]R&   R tR R	 ltR
 R ltR R ltR t	R R lt
RtR# )rW   r   _pathr"   r#   r.   rP   c                	X    V P                  4        F  pVP                  ! R/ VB  K  	  R # NrJ   )casesrS   )r>   kwargscases   &, r   rS   Version.benchmarkm   s!    JJLDNN$V$ !r   c                   V ^8  d   QhRR/# rH   rV   Iterable[_Case]rJ   )rK   s   "r   rL   Version.__annotate__q   s     ? ? ?r   c                	X    V P                  V P                  P                  R 4      R7      # )z*.jsonpaths	_cases_inrd   globr>   s   &r   rg   Version.casesq   s     ~~DJJOOH$=~>>r   c                   V ^8  d   QhRR/# rl   rJ   )rK   s   "r   rL   rn   t   s     O Oo Or   c                	X    V P                  V P                  P                  R 4      R7      # )zoptional/format/*.jsonrp   rr   ru   s   &r   format_casesVersion.format_casest   s!    ~~DJJOO4L$M~NNr   c                    V ^8  d   QhRRRR/# )rH   rP   r.   rV   rm   rJ   )rK   s   "r   rL   rn   w   s     P Pc Po Pr   c                	^    V P                  V P                  R ,          V R2,          .R7      # )optionalz.jsonrp   )rs   rd   r[   s   &&r   optional_cases_ofVersion.optional_cases_ofw   s*    ~~TZZ*%<$u~%M$N~OOr   c                	  a SP                  R RV P                  P                  4       P                  RR4      ,           4      pV3R lV 4        Uu/ uF  pVP                  VbK  	  pp\        V\        P                  3V4      p\        \        4      ;_uu_ 4        \        4       Vn        RRR4       V# u upi   + '       g   i     T# ; i)rP   Test- c              3     <"   T F3  pV F*  pVP                    F  pVP                  ! R/ SB x  K  	  K,  	  K5  	  R # 5irf   )rY   to_unittest_method).0groupri   testrh   s   &   r   	<genexpr>/Version.to_unittest_testcase.<locals>.<genexpr>~   sF      #E!D JJD ''1&1 ' 2! 2#s   ;>N)r7   rP   titlereplacer]   typeunittestTestCaser   	Exception)_someone_save_us_the_module_of_the_callerr^   )r>   groupsrh   rP   methodmethodsclss   &*l    r   to_unittest_testcaseVersion.to_unittest_testcasez   s    zz&&499??+<+D+DS"+M"MN#
 OOV# 	 
 4(++-w7
 i  FHCN ! 
#
 !  
s   B6B;;C	c                    V ^8  d   QhRRRR/# )rH   rq   zIterable[Path]rV   rm   rJ   )rK   s   "r   rL   rn      s      ~ / r   c           	   #  	   "   V F_  p\         P                  ! VP                  R R7      4       F2  p\        P	                  VV VP
                  V P                  R7      x  K4  	  Ka  	  R# 5i)r(   )encoding)rR   subjectr'   N)r   r2   	read_text_Case	from_dictstemr#   )r>   rq   rZ   ri   s   &&  r   rs   Version._cases_in   sX     D

4>>7>#CDoo  II MM	 &   E s   A(A*rJ   N)r]   r^   r_   r`   ra   rS   rg   ry   r~   r   rs   rb   rJ   r   r   rW   rW   e   s9     K33
I%?OP* r   rW   c                  t    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R	&   R
tR]R&   ]R 4       tR R ltRt	R
# )r   rW   rR   r.   r   descriptionMapping[str, Any] | boolschemazlist[_Test]rY   N
str | Nonecommentc                	    VP                  V4       VP                  R 4       Uu. uF4  p\        RRVR,          RVR,          RVR,          RVR,          RV/VB NK6  	  ppV ! RR V/VB # u upi )rY   rR   r   case_descriptionr   r   r'   rJ   )updater7   _Test)r   datar'   rh   r   rY   s   &&&,  r   r   _Case.from_dict   s    F ((7+	
 ,$  YY "&m!4 H~	
    , 	 	
 ''$''	
s   :A+c                   V ^8  d   QhRR/# rG   rJ   )rK   s   "r   rL   _Case.__annotate__   rN   r   c           	     	    V P                    F3  pVP                  VP                  \        VP                  3/ VB 4       K5  	  R # N)rY   
bench_funcfully_qualified_namer   validate_ignoring_errors)r>   rI   rh   r   s   &&, r   rS   _Case.benchmark   s:    JJD))55@@ r   rJ   )
r]   r^   r_   r`   ra   r   classmethodr   rS   rb   rJ   r   r   r   r      sG     L$$GZ( ( r   r   F)reprc                      ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R]R&   R	]R
&   R]R&   R]R&   RtR]R&   R t]R 4       tR 3R lt	R t
R tRtR# )r   rW   rR   r.   r   r   r   r	   r   r   r   boolvalidr"   r#   Nr   r   c                	"    R V P                    R2# )z<Test >)r   ru   s   &r   __repr___Test.__repr__   s    112!44r   c                	    R P                  V P                  P                  V P                  V P                  V P
                  .4      # )z > )joinrR   rP   r   r   r   ru   s   &r   r   _Test.fully_qualified_name   s>    zz!!%%  	
 	
r   c                	    R # r   rJ   )r   s   &r   <lambda>_Test.<lambda>   s    4r   c           	     	D  a a S P                   '       d	   VV 3R  lpMVV 3R lpRP                  R\        P                  RS P                  4      \        P                  RS P
                  4      \        P                  RS P                  4      .4      Vn        V! S 4      pVe&   \        P                  P                  RR4      R8w  d   V# \        P                  P                  RR4      R8w  d   \        P                  ! V4      # \        P                  ! V4      ! V4      # )c                ,   < SP                   ! R/ SB  R # rf   )validatethisrh   r>   s   &r   fn$_Test.to_unittest_method.<locals>.fn   s    ''r   c                   < V P                  \        P                  4      ;_uu_ 4        SP                  ! R/ SB  R R R 4       R #   + '       g   i     R # ; irf   )assertRaisesr   ValidationErrorr   r   s   &r   r   r      s9    &&z'A'ABBMM+F+ CBBBs   AA	_r   JSON_SCHEMA_DEBUG0JSON_SCHEMA_EXPECTED_FAILURES)r   r   _DELIMITERSsubr   r   r   r]   r   r   r   r   expectedFailureskip)r>   r   rh   r   reasons   f&l  r   r   _Test.to_unittest_method   s    :::(, hhT\\2T%:%:;T%5%56	
 d>RZZ^^,?ELIZZ^^;SASH++B//==(,,r   c                	   VP                  V P                  4       V! RR V P                  RV P                  /VB p\        P                  P                  RR4      R8w  d   \        4        VP                  V P                  R7       R# )r   rC   r   r   )instanceNrJ   )	check_schemar   r#   r   r   r   
breakpointr   r   )r>   rQ   rh   	validators   &&, r   r   _Test.validate   st    t{{+ 
;;
]]
 
	
 ::>>-s3s:LDII.r   c                	    \        \        P                  4      ;_uu_ 4        V P                  VR 7       RRR4       R#   + '       g   i     R# ; i))rQ   N)r   r   r   r   )r>   rQ   s   &&r   r   _Test.validate_ignoring_errors   s0    j0011MMIM. 2111s	   ?A	rJ   )r]   r^   r_   r`   ra   r   r   propertyr   r   r   r   rb   rJ   r   r   r   r      sh     L
I$$K33GZ5 
 
 '8 -2	//r   r   c                 P    \         P                  ! ^4      P                  R,          # )ak  
The FQON of the module 2nd stack frames up from here.

This is intended to allow us to dynamically return test case classes that
are indistinguishable from being defined in the module that wants them.

Otherwise, trial will mis-print the FQON, and copy pasting it won't re-run
the class that really is running.

Save us all, this is all so so so so so terrible.
r]   )r,   	_getframe	f_globalsrJ   r   r   r   r     s     ==%%j11r   )'__doc__
__future__r   collections.abcr   r   
contextlibr   	functoolsr   pathlibr   typingr   r	   r   r   rer/   r,   r   attrsr
   r   r4   r   referencing.jsonschemapyperfjsonschema.validatorsr   r   compiler   r   r   rW   r   r   r   rJ   r   r   <module>r      s    # -    %  	 	  
      - jj%$ 0
 0
 0
f 1 1 1h   B UE/ E/ E/P2r   