Current File : //usr/lib/python3/dist-packages/jsonschema/tests/__pycache__/_suite.cpython-312.pyc |
�
`��dq � �@ � d Z ddlmZ ddlmZ ddlZddlZddlZddlZddl Z ddl
Z
ddlZddlm
Z
ddlZd� Z ej d�� G d � d
e� � Z ej d�� G d� de� � Z ej dd
�� G d� de� � Zd� Zy)z=
Python representations of the JSON Schema Test Suite tests.
� )�partial)�PathN)�_VALIDATORSc �� � t j j d� } | �t | � S t t j
� j j dz } | j � st d� �| S )N�JSON_SCHEMA_TEST_SUITE�jsonz�Can'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 sh � �
�:�:�>�>�2�3�D����D�z���
�#�#�$�+�+�2�2�V�;�D��;�;�=�� �
�
� �K� T)�hashc �d � e Zd Z ej ej
e� �� Zd� Zd� Z d� Z
y)�Suite��defaultc �� � | j j dd� }t j t j
t
|� dg� }t j |j d� � S )N�bin�jsonschema_suite�remotes�utf-8)
�_root�joinpath�
subprocess�check_output�sys�
executable�strr �loads�decode)�selfr r s r �_remoteszSuite._remotes+ sX � ��:�:�.�.�u�6H�I���)�)�
�^�^�S�!1�2�I�>�
�� �z�z�'�.�.��1�2�2r c � � t j � D ]( \ }}| j |�� j ||�� �* y )N)�name)�runner� Validator)r �items�version� benchmark)r( r, r+ r- s r r0 zSuite.benchmark2 sB � �*�0�0�2� �O�D�)��L�L�d�L�#�-�-��#�
.�
� r c �n � t || j j d|� | j � �� S )N�tests)r+ �pathr )�Versionr r r) �r( r+ s r r/ z
Suite.version9 s/ � ������$�$�W�d�3��M�M�O�
�
r N)�__name__�
__module__�__qualname__�attr�ib�Factoryr r r) r0 r/ � r r r r &