
    g	                     z   d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dl	Z G d de
      Zdej                  v r eej                  d         dz  Zn) ee      j                  j                  j                  d	z  Zej!                         s e        ej"                  ej%                  d
      j'                               Zej*                  j-                  dej/                  d      D  cg c]8  } ej1                  | | j                  j2                   d| j4                         : c}       d        Zyc c} w )    )PathN)Registry)Unresolvablec                       e Zd Zd Zy)SuiteNotFoundc                      	 y)NzCannot find the referencing suite. Set the REFERENCING_SUITE environment variable to the path to the suite, or run the test suite from alongside a full checkout of the git repository. )selfs    ]/var/www/openai/venv/lib/python3.12/site-packages/referencing/tests/test_referencing_suite.py__str__zSuiteNotFound.__str__   s    %	
    N)__name__
__module____qualname__r   r	   r   r   r   r      s    
r   r   REFERENCING_SUITEtestszsuite/testszspecifications.json	test_pathz*/**/*.json-)idc                 :  	 t         | j                  t              j                  d      }t        j
                  j                  |      	t        j                  | j                               }|d   }t               j                  	fd|d   j                         D              }|d   D ]I  }|j                  |      5  d| j                  v rt        j                   d       |j#                  |j%                  dd	      
      }|j%                  d      r7t        j&                  t(              5  |j+                  |d          d d d        n|j+                  |d         }|j,                  |d   k(  sJ |j%                  d      }|rc|j                  ||      5  |j"                  j+                  |d         }|j,                  |d   k(  sJ 	 d d d        |j%                  d      }|rcd d d        L y # 1 sw Y   xY w# 1 sw Y   5xY w# 1 sw Y   pxY w)Nr   registryc              3   J   K   | ]  \  }}|j                  |      f  y w)N)create_resource).0uricontentsspecifications      r   	<genexpr>z)test_referencing_suite.<locals>.<genexpr>+   s-      )7MC 
m++H567s    #r   )testnormalizationz+APIs need to change for proper URL support.base_uri )r!   errorreftargetthen)r   r&   )DIALECT_IDSrelative_toSUITEpartsreferencing
jsonschemaspecification_withjsonloads	read_textr   with_resourcesitemsr   stempytestxfailresolvergetraisesr   lookupr   )
r   subtests
dialect_idloadedr   r   r6   resolvedr&   r   s
            @r   test_referencing_suiter>      s    Y2259??BCJ**==jIMZZ	++-.Fj!Hz(( )#J/557) H w]]]%)..0JK(($((:r2J(KHxx ]]<0OODK0 10 $??4;7((DN:::xx'!Dt<#+#4#4#;#;DK#H'00DNBBB =  88F+D	  &%   10 =< &%s>    A0H0G8AH3HH8H=HH	HH	)pathlibr   r.   osr4   r+   r   referencing.exceptionsr   referencing.jsonschema	Exceptionr   environr)   __file__parentis_dirr/   joinpathr0   r'   markparametrizeglobparamnamer3   r>   )eachs   0r   <module>rO      s     	    / 
I 
 "**$/01G;EN!!((//-?E||~
/djj(=>HHJK  JJ}--D 	T!1!1 2!DII;?@-,,s   -=D8
