HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/self/root/usr/lib/python3/dist-packages/jsonschema/tests/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib/python3/dist-packages/jsonschema/tests/__pycache__/_suite.cpython-311.pyc
�

�r�cq��Z�dZddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlZd�Zejd���Gd	�d
e����Zejd���Gd�de����Zejdd
���Gd�de����Zd�ZdS)z=
Python representations of the JSON Schema Test Suite tests.
�)�partial)�PathN)�_VALIDATORSc��tj�d��}|�t|��Sttj��jjdz}|���std���|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_suitersq��
�:�>�>�2�3�3�D����D�z�z���
�#�$�$�+�2�V�;�D��;�;�=�=�
�� �
�
�	
��K�T)�hashc�^�eZdZejeje�����Zd�Zd�Z	d�Z
dS)�Suite��defaultc���|j�dd��}tjtjt
|��dg��}tj|�	d����S)N�bin�jsonschema_suite�remotes�utf-8)
�_root�joinpath�
subprocess�check_output�sys�
executable�strr�loads�decode)�selfrrs   r�_remoteszSuite._remotes+s`���:�.�.�u�6H�I�I���)�
�^�S�!1�2�2�I�>�
�
���z�'�.�.��1�1�2�2�2rc��tj��D]0\}}|�|����||����1dS)N)�name)�runner�	Validator)r�items�version�	benchmark)r(r,r+r-s    rr0zSuite.benchmark2s^��*�0�2�2�	�	�O�D�)��L�L�d�L�#�#�-�-��#�
.�
�
�
�
�	�	rc�|�t||j�d|��|������S)N�tests)r+�pathr)�Versionrr r)�r(r+s  rr/z
Suite.version9s<������$�$�W�d�3�3��M�M�O�O�
�
�
�	
rN)�__name__�
__module__�__qualname__�attr�ib�Factoryrrr)r0r/�rrrr&sc������
�D�G�L�D�L��5�5�6�6�6�E�3�3�3����
�
�
�
�
rrc��eZdZej��Zej��Zej��Zd�Zd�Z	d�Z
d�Zd�Zd�Z
dS)r4c
��|���D]2}|D]-}|�|jt|jfi|�����.�3dS�N)r2�
bench_func�fully_qualified_namer�validate_ignoring_errors)r(r,�kwargs�suite�tests     rr0zVersion.benchmarkIsp���Z�Z�\�\�	�	�E��
�
���!�!��-��D�9�D�D�V�D�D�����
�	�	rc�P���fd��j�d��D��S)Nc3�j�K�|]-}��|jdd�|���D]}|V���.dS�N�����subjectr3��	_tests_inr+��.0�childrEr(s   �r�	<genexpr>z Version.tests.<locals>.<genexpr>R�q�����
�
������
�3�B�3���'���
�
��
�
�
�
�
�
�
�
r�*.json)�_path�glob�r(s`rr2z
Version.testsQs<���
�
�
�
������2�2�
�
�
�	
rc�|���j�dd��}�fd�|�d��D��S)N�optional�formatc3�j�K�|]-}��|jdd�|���D]}|V���.dSrHrLrNs   �rrQz'Version.format_tests.<locals>.<genexpr>]rRrrS)rTr rU)r(r3s` r�format_testszVersion.format_tests[sQ����z�"�"�:�x�8�8��
�
�
�
����8�,�,�
�
�
�	
rc�h�|�||j�d|dz�����S)NrXz.jsonrJ)rMrTr r5s  r�optional_tests_ofzVersion.optional_tests_offs9���~�~����$�$�Z����@�@��
�
�	
rc�.����dd|j����dd��z��}�fd�|D��}t	|t
jf|��}	t��|_n#t$rYnwxYw|S)Nr+�Test�-�c
�J��i|]}|D]}|D]}|j|jdi������� S)r<)�method_name�to_unittest_method)rOrDr2rErCs    �r�
<dictcomp>z0Version.to_unittest_testcase.<locals>.<dictcomp>nsp���
�
�
���
�
���	
�
��
��5�d�5�?�?��?�?�
�
�
�
�
r)
�popr+�title�replace�type�unittest�TestCase�)_someone_save_us_the_module_of_the_callerr7�	Exception)r(�suitesrCr+�methods�clss  `   r�to_unittest_testcasezVersion.to_unittest_testcasels�����z�z�&�&�4�9�?�?�+<�+<�+D�+D�S�"�+M�+M�"M�N�N��
�
�
�
��
�
�
���4�(�+�-�w�7�7��	�F�H�H�C�N�N���	�	�	�
�D�		�����
s�1B�
B�Bc#����K�tj|�d�����D]����fd��dD��V��dS)Nr)�encodingc
3�^�K�|]'}td���d�d�jd�|��V��(dS)�description�schema)r/rK�case_descriptionrvrNr<)�_Testr))rOrE�eachr(rKs  ���rrQz$Version._tests_in.<locals>.<genexpr>�sq�����	�	���� �#�%)�-�%8���>� �M����
��	�	�	�	�	�	rr2)rr&�	read_text)r(rKr3rys`` @rrMzVersion._tests_in�s���������J�t�~�~�w�~�?�?�@�@�
	�
	�D�	�	�	�	�	�	�#�7�m�	�	�	�	
�	
�	
�	
�
	�
	rN)r6r7r8r9r:rTr)r+r0r2r[r]rqrMr<rrr4r4As�������
�D�G�I�I�E��t�w�y�y�H��4�7�9�9�D����
�
�
�	
�	
�	
�
�
�
����(����rr4F)r�reprc�n�eZdZej��Zej��Zej��Zej��Zej��Z	ejd���Z
ej��Zej��Zejd���Z
d�Zed���Zed���Zd�fd	�Zd
�Zd�ZdS)rxF)r{Nrc�6�d�|j��S)Nz	<Test {}>)rYrArVs r�__repr__z_Test.__repr__�s���!�!�$�";�<�<�<rc�f�d�|jj|j|j|jg��S)Nz > )�joinr/r+rKrwrurVs rrAz_Test.fully_qualified_name�s6���z�z���!����%�� �	
�
�
�	
rc	���d}d�tj|d|j��tj|d|j��tj|d|j����S)Nz[\W\- ]+z
test_{}_{}_{}�_)rY�re�subrKrwru)r(�
delimiterss  rrcz_Test.method_name�sZ�� �
��%�%��F�:�s�D�L�1�1��F�:�s�D�$9�:�:��F�:�s�D�$4�5�5�
�
�	
rc��dSr?r<)rEs r�<lambda>z_Test.<lambda>�s��4�rc�����jr��fd�}n��fd�}�j|_|���}|�|Stj�dd��dkrt
j|��St
j|��|��S)Nc�"���jdi���dS�Nr<)�validate��thisrCr(s ��r�fnz$_Test.to_unittest_method.<locals>.fn�s!�����
�'�'��'�'�'�'�'rc���|�tj��5�jdi���ddd��dS#1swxYwYdSr�)�assertRaisesr�ValidationErrorr�r�s ��rr�z$_Test.to_unittest_method.<locals>.fn�s�����&�&�z�'A�B�B�,�,�!�D�M�+�+�F�+�+�+�,�,�,�,�,�,�,�,�,�,�,�,����,�,�,�,�,�,s�<�A�A�JSON_SCHEMA_EXPECTED_FAILURES�0)	�validrcr6r	r
rrj�expectedFailure�skip)r(r�rCr��reasons` `  rrdz_Test.to_unittest_method�s������:�	,�
(�
(�
(�
(�
(�
(�
(�
,�
,�
,�
,�
,�
,��&�����d�����>��I�
�Z�^�^�;�S�
A�
A�S�
H�
H��+�B�/�/�/�(�8�=��(�(��,�,�,rc�j�|�|j��tj�|j|j|j���}d�}||_|d|j|d�|��}tj	�
dd��dkrt��|�|j
���dS)N)rv�store�id_ofc�&�td|�����)NzTried to access the network: )�RuntimeError)�uris r�prevent_network_accessz._Test.validate.<locals>.prevent_network_access�s���D�s�D�D�E�E�Er)rv�resolver�JSON_SCHEMA_DEBUGr�)�instancer<)�check_schemarvr�RefResolver�from_schemar)�ID_OF�resolve_remoter	r
r�
breakpointr��data)r(r-rCr�r��	validators      rr�z_Test.validate�s������t�{�+�+�+��)�5�5��;��-��/�6�
�
��	F�	F�	F�"8����I�N�T�[�8�N�N�v�N�N�	�
�:�>�>�-�s�3�3�s�:�:��L�L�L����D�I��.�.�.�.�.rc�`�	|�|���dS#tj$rYdSwxYw)N)r-)r�rr�)r(r-s  rrBz_Test.validate_ignoring_errors�sF��	��M�M�I�M�.�.�.�.�.���)�	�	�	��D�D�	���s��-�-)r6r7r8r9r:r/rKrwrur�rvr�r)�commentr~�propertyrArcrdr�rBr<rrrxrx�s�������d�g�i�i�G��d�g�i�i�G��t�w�y�y���$�'�)�)�K��4�7�9�9�D�
�T�W�%�
 �
 �
 �F��D�G�I�I�E��t�w�y�y�H��d�g�d�#�#�#�G�=�=�=��
�
��X�
��
�
��X�
�'8�&7�-�-�-�-�$/�/�/�(����rrxc�@�tjd��jdS)a�
    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.
    �r6)r#�	_getframe�	f_globalsr<rrrlrl�s���=����%�j�1�1r)�__doc__�	functoolsr�pathlibrrr	r�r!r#rjr9�jsonschema.validatorsrrr�s�objectrr4rxrlr<rr�<module>r�s���������������������	�	�	�	�	�	�	�	�����
�
�
�
���������-�-�-�-�-�-��������$���T����
�
�
�
�
�F�
�
���
�4���T����I�I�I�I�I�f�I�I���I�X���T�����R�R�R�R�R�F�R�R���R�j
2�
2�
2�
2�
2r