+
     h-  c            
       s   ^ RI t ^ RIHtHtHt ^ RIt] P                  P                  RR]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R	]P                  P                  3.4      R
 4       tR t] P                  P                  RR]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3.4      R 4       t] P                  P                  R]P                  P                  ]P                  P                  ]P                  P                  ]P                  P                  .4      ] P                  P                  RRR.4      R 4       4       t] P                  P                  R]P                  P                  ]P                  P                  ]P                  P                  ]P                  P                  .4      ] P                  P                  RRR.4      R 4       4       t] P                  P                  R]P                  P                  ]P                  P                  ]P                  P                  ]P                  P                  .4      ] P                  P                  RRR.4      R 4       4       t] P                  P                  RR]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3R	]P                  P                  3.4      R 4       t] P                  P                  RR]P                  P                  3R]P                  P                  3R]P                  P                  3R]P                  P                  3.4      R 4       tR tR tR tR  tR! tR" tR# tR$ tR% tR& t R# )'i    N)RegistryResourceSpecificationzuri, expectedz,https://json-schema.org/draft/2020-12/schemaz,https://json-schema.org/draft/2019-09/schemaz'http://json-schema.org/draft-07/schema#z'http://json-schema.org/draft-06/schema#z'http://json-schema.org/draft-04/schema#z'http://json-schema.org/draft-03/schema#c                s:    RV /p\         P                  ! V4      pR# )z=
The $schema keyword in JSON Schema is a dialect identifier.
$schemaN)r   from_contents)uriexpectedZcontentsZresources   &&  F/usr/lib/python3.14/site-packages/referencing/tests/test_jsonschema.py7test_schemas_with_explicit_schema_keywords_are_detectedr      s    B 3H%%h/H    c                  s    R p \         P                  ! \        P                  P                  4      ;_uu_ 4       p\
        P                  ! RV /4       RRR4       R#   + '       g   i     R# ; i)1http://example.com/unknown-json-schema-dialect-idr   N)pytestraisesreferencing
jsonschemaUnknownDialectr   r   
dialect_idZexcinfo     r   test_unknown_dialectr   -   sF    DJ	{--<<	=	=	:67 
>	=	=	=s   AA-	zid, specification$ididc                 s
    R pR# )zhttp://example.com/some-schemaN )r   specificationr   s   && r   test_id_of_mappingr   4   s	     +Cr	   r   valueTFc                     R # Nr   r   r      &&r   test_id_of_boolr   D       r	   c                 r   r   r   r   r   r   test_anchors_in_boolr    R   r   r	   c                 r   r   r   r   r   r   test_subresources_of_boolr!   `   r   r	   c                 r   r   r   r   r   r   r   test_specification_withr#   n   r   r	   z&http://json-schema.org/draft-07/schemaz&http://json-schema.org/draft-06/schemaz&http://json-schema.org/draft-04/schemaz&http://json-schema.org/draft-03/schemac                 r   r   r   r"   r   r   )test_specification_with_no_empty_fragmentr$      r   r	   c                  s    R p \         P                  ! \        P                  P                  4      ;_uu_ 4       p\        P                  P                  V 4       RRR4       R#   + '       g   i     R# ; i)r
   N)r   r   r   r   r   specification_withr   r   r   'test_specification_with_unknown_dialectr&      sG    DJ	{--<<	=	=11*= 
>	=	=	=s    A##A4	c                  sh    R p \         P                  P                  V \        P                  R7      pR# )r
   )ZdefaultN)r   r   r%   r   ZOPAQUE)r   r   r   r   test_specification_with_defaultr'      s.    DJ**==$$ > Mr	   c                  s    \         P                  P                  P                  R R/4      p \	        4       P                  RV 4      P                  4       pVP                  R4      pR# )$dynamicAnchorfoohttp://example.comzhttp://example.com#fooN)r   r   DRAFT202012create_resourcer    with_resourceresolverlookup)oner.   resolved      r   test_lookup_trivial_dynamic_refr3      sU    

 
 
,
,
<
<	5!C z''(<cBKKMH78Hr	   c                  s   \         P                  P                  P                  R 4      p \         P                  P                  P                  RRRRRRRRRRRRR RRR/////4      p\	        4       P                  RV3R	V 3R
V3.4      P                  4       pVP                  R4      pVP                  P                  R4      pVP                  P                  R4      P                  pVP                  R4      pR# )Tr   r*   r(   	fooAnchor$defsr)   barbazhttp://example.com/foo/http://example.com/foo/barfoo/
#fooAnchorNr   r   r+   r,   r    with_resourcesr.   r/   TRUEZrootr.   firstsecondfourth         r   (test_multiple_lookup_trivial_dynamic_refrD      s   !!--==dCD!!--=='k5$kt,k 		
D& 	
	%t,*D1-t4

 
  OO01E^^""6*F%%e,55H__\*Fr	   c                  s   \         P                  P                  P                  R R/4      p \         P                  P                  P                  RRRRRRRRRRRRRR	RR/////4      p\	        4       P                  RV3R
V 3RV3.4      P                  4       pVP                  R4      pVP                  P                  R4      pVP                  P                  R4      P                  pVP                  R4      pR# )$anchorr4   r   r*   r(   r5   r)   r6   Tr7   r8   r9   r:   r;   Nr<   )r0   twor.   r@   rA   rB   rC   r   2test_multiple_lookup_dynamic_ref_to_nondynamic_refrG      s   

 
 
,
,
<
<	K C 
 
 
,
,
<
<'k5$kt,k 		
C& 	
	%s+*C0-s3

 
  OO01E^^""6*F%%e,55H__\*Fr	   c                  s"   \         P                  P                  P                  R R/4      p \	        4       P                  RV 4      P                  4       pVP                  R4      p\         P                  P                  VP                  R7      pR# )$recursiveAnchorTr*   r.   N)	r   r   DRAFT201909r,   r    r-   r.   r/   lookup_recursive_ref)r0   r.   r@   r1   s       r   !test_lookup_trivial_recursive_refrL     sw    

 
 
,
,
<
<	T"C z''(<cBKKMHOO01E%%:: ; Hr	   c                  s    \         P                  P                  P                  R 4      p \	        RV /4      p\         P                  P                  VP                  RR7      R7      pR# )Tr*   )Zbase_urirI   N)r   r   rJ   r,   r    rK   r.   )r?   Zregistryr1   r2   r   !test_lookup_recursive_ref_to_boolrM     s[    !!--==dCD-t45H%%::"",@"A ; Hr	   c                  s   \         P                  P                  P                  R 4      p \         P                  P                  P                  RRRR RRRRRR RRR RRR RR	/////4      p\	        4       P                  RV3R
V 3RV3.4      P                  4       pVP                  R4      pVP                  P                  R4      pVP                  P                  R4      P                  p\         P                  P                  VR7      pR# )Tr   r*   rH   r5   r)   r6   r7   rE   r4   r8   r9   r:   rI   N	r   r   rJ   r,   r    r=   r.   r/   rK   r>   rC   r   *test_multiple_lookup_recursive_ref_to_boolrO   (  s   !!--==dCD!!--=='5&t.%{ 
	
D( 	
	%t,*D1-t4

 
  OO01E^^""6*F%%e,55H##88(8KFr	   c                  sr   \         P                  P                  P                  R R/4      p \         P                  P                  P                  RRR RRRRRR RRRRRR RRR	/////4      p\         P                  P                  P                  R R
/4      p\	        4       P                  RV3RV3RV 3.4      P                  4       pVP                  R4      pVP                  P                  R4      pVP                  P                  R4      P                  p\         P                  P                  VR7      pR# )rH   Tr   r*   r5   r)   r6   r7   rE   r4   Fr8   r9   r:   rI   NrN   )r0   rF   Zthreer.   r@   rA   rB   s          r   8test_multiple_lookup_recursive_ref_with_nonrecursive_refrP   P  sG   

 
 
,
,
<
<	T"C 
 
 
,
,
<
<'5&t.%{ 
	
C& ""..>>	U#E 	
	%u-*C0-s3

 
  OO01E^^""6*F%%e,55H##88(8KFr	   c                  r   r   r   r   r	   r   test_empty_registryrQ   }  r   r	   )!r   r   r    r   r   Zreferencing.jsonschemaZmarkZparametrizer   r+   rJ   ZDRAFT7ZDRAFT6ZDRAFT4ZDRAFT3r   r   r   r   r    r!   r#   r$   r&   r'   r3   rD   rG   rL   rM   rO   rP   rQ   r   r	   r   <module>rR      s    9 9   ;""..	

 ;""..	

 6""))	

 6""))	

 6""))	

 6""))	
+:K;:K+ 	&&223	&&223	&&--.	&&--.	{%%,,-	{%%,,-
1
1
 ****%%%%	 4-0. 1. ****%%%%	 4-07 17 ****%%%%	 4-0< 1<  ;""..	

 ;""..	

 6""))	

 6""))	

 6""))	

 6""))	
+:F;:F  5""))	

 5""))	

 5""))	

 5""))	
*F+*F+1-$,N&+R	-.%,P*+Z?r	   