403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.12/site-packages/jsonschema/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.12/site-packages/jsonschema/tests/__pycache__/_suite.cpython-312.opt-1.pyc
�

�% g~���dZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
mZddlZddlZddlZddlZddlZddlZdd	lmZmZdd
lmZddlZe
rddlZddlmZddlZej>d�Z d
�Z!eGd�d��Z"eGd�d��Z#eGd�d��Z$ed��Gd�d��Z%d�Z&y)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���tjjd�}|�t|�Sttj
�jjdz}|j�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 �</usr/lib/python3.12/site-packages/jsonschema/tests/_suite.py�_find_suitersh��
�:�:�>�>�2�3�D����D�z���
�#�#�$�+�+�2�2�V�;�D��;�;�=�� �
�	
��K�c�\�eZdZUee��Zded<ed��Zded<d�Zdd	�Z	d
d
�Z
y)�Suite)�factoryr�_rootF)�init�%referencing.jsonschema.SchemaRegistry�_remotesc	��|jjdd�}tjt	|�dg}tj|�jd�}tj|�}d}d}t�j|tjjj|j!|���f|tjj"j|j!|���fg�j%|j'�tjj(��}t*j-|d	|�y)
N�bin�jsonschema_suite�remotes�utf-8z?http://localhost:1234/locationIndependentIdentifierPre2019.jsonz>http://localhost:1234/locationIndependentIdentifierDraft4.json)�contents)�default_specificationr$)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__zSuite.__attrs_post_init__7s'���:�:�.�.�u�6H�I������$4� 5�y�A���)�)�$�/�6�6�w�?���J�J�w�'�	�
N��N���:�,�,���*�*�1�1�A�A�!*���r�!2�B�����*�*�1�1�A�A�!*���s�!3�B���

�
��-��O�O��"-�"8�"8�"D�"D��
�	�&	���4��X�6rc��tj�D](\}}|j|��j||���*y)N)�name)�runner�	Validator)rr;�version�	benchmark)r?rHrGrIs    rrKzSuite.benchmarkVs=��*�0�0�2�O�D�)��L�L�d�L�#�-�-��#�
.�
� 3rc�R�t||jdz|z|j��S)N�tests)rG�pathr()�Versionr!r$�r?rGs  rrJz
Suite.version]s*�������g�%��,��M�M�
�	
rN�rHz
pyperf.Runner)�returnrO)�__name__�
__module__�__qualname__rrr!�__annotations__r$rErKrJ�rrrr1s2����,�E�4�,�6;��6G�H�3�G�7�>�
rrc�X�eZdZUded<ded<ded<d�Zdd�Zdd	�Zdd
�Zd�Zdd�Z	y
)rOr�_pathr#r$r/rGc�R�|j�D]}|jdi|���y�NrW)�casesrK)r?�kwargs�cases   rrKzVersion.benchmarkms#���J�J�L�D��D�N�N�$�V�$�!rc�X�|j|jjd���S)Nz*.json��paths��	_cases_inrY�glob�r?s rr\z
Version.casesqs ���~�~�D�J�J�O�O�H�$=�~�>�>rc�X�|j|jjd���S)Nzoptional/format/*.jsonr`rbres r�format_caseszVersion.format_casests!���~�~�D�J�J�O�O�4L�$M�~�N�Nrc�N�|j|jdz|�d�zg��S)N�optionalz.jsonr`)rcrYrPs  r�optional_cases_ofzVersion.optional_cases_ofws*���~�~�T�Z�Z�*�%<�$��u�~�%M�$N�~�O�Orc�r���jdd|jj�jdd�z�}�fd�|D�D�cic]}|j|��}}t|tjf|�}tt�5t�|_ddd�|Scc}w#1swY|SxYw)NrG�Test�-�c3�r�K�|].}|D]'}|jD]}|jdi�������)�0y�wr[)rM�to_unittest_method)�.0�groupr^�testr]s    �r�	<genexpr>z/Version.to_unittest_testcase.<locals>.<genexpr>~sI������#�E�!�D� �J�J�D�(��'�'�1�&�1�'�2�!�2�#�s�47)r8rG�title�replacerS�type�unittest�TestCaser�	Exception�)_someone_save_us_the_module_of_the_callerrT)r?�groupsr]rG�method�methods�clss  `    r�to_unittest_testcasezVersion.to_unittest_testcasezs�����z�z�&�&�4�9�9�?�?�+<�+D�+D�S�"�+M�"M�N���#��
���
�O�O�V�#��	�
��4�(�+�+�-�w�7��
�i�
 �F�H�C�N�!��
��#
�!��
�s�B'�
B,�,B6c#��K�|D][}tj|jd���D]1}tj	|||j
|j�����3�]y�w)Nr))�encoding)rJ�subjectr()rr3�	read_text�_Case�	from_dict�stemr$)r?rarNr^s    rrczVersion._cases_in�sY�����D��
�
�4�>�>�7�>�#C�D���o�o�� � �I�I� �M�M�	&���E��s�A"A$N)rR�Iterable[_Case])rGr/rRr�)razIterable[Path]rRr�)
rSrTrUrVrKr\rgrjr�rcrWrrrOrOes4���K�3�3�

�I�%�?�O�P��*rrOc�f�eZdZUded<ded<ded<ded<ded	<d
Zded<ed
��Zdd�Zy
)r�rOrJr/r��description�Mapping[str, Any] | bool�schemazlist[_Test]rMN�
str | None�commentc��|j|�|jd�D�cgc]}td|d|d|d|d|d�|����!}}|dd|i|��Scc}w)NrMrJr�r�r�)rJr��case_descriptionr�r(rW)�updater8�_Test)r�datar(r]rsrMs      rr�z_Case.from_dict�s������F���(�(�7�+�	
�,�$�
�
��Y���Y��!%�m�!4��H�~��
��

�,�	�	
��'��'�$�'�'��	
s�$Ac	��|jD]2}|j|jt|jfi|����4y�N)rM�
bench_func�fully_qualified_namer�validate_ignoring_errors)r?rHr]rss    rrKz_Case.benchmark�s:���J�J�D�����)�)���5�5�@��@�
�rrQ)rSrTrUrVr��classmethodr�rKrWrrr�r��sB����
�L���$�$����G�Z���(��(�rr�F)�reprc��eZdZUded<ded<ded<ded<ded<d	ed
<ded<d
ed<dZded<d�Zed��Zd�fd�Zd�Z	d�Z
y)r�rOrJr/r�r�r�r
r�r�r��bool�validr#r$Nr�r�c�"�d|j�d�S)Nz<Test �>)r�res r�__repr__z_Test.__repr__�s����1�1�2�!�4�4rc��dj|jj|j|j|j
g�S)Nz > )�joinrJrGr�r�r�res rr�z_Test.fully_qualified_name�s>���z�z����!�!�����%�%�� � �	
�
�	
rc��yr�rW)rss r�<lambda>z_Test.<lambda>�s��4rc	�$����jr��fd�}n��fd�}djdtjd�j�tjd�j
�tjd�j�g�|_|��}|�#tjjdd�dk7r|Stjjdd�dk7rtj|�Stj|�|�S)Nc�*���jdi���yr[)�validate��thisr]r?s ��r�fnz$_Test.to_unittest_method.<locals>.fn�s�����
�
�'��'rc���|jtj�5�jdi���ddd�y#1swYyxYwr[)�assertRaisesr�ValidationErrorr�r�s ��rr�z$_Test.to_unittest_method.<locals>.fn�s5����&�&�z�'A�'A�B�!�D�M�M�+�F�+�C�B�B�s	�=�A�_rs�JSON_SCHEMA_DEBUG�0�JSON_SCHEMA_EXPECTED_FAILURES)r�r��_DELIMITERS�subr�r�r�rSrrrrx�expectedFailure�skip)r?r�r]r��reasons` `  rrpz_Test.to_unittest_method�s�����:�:�
(�
,��h�h������T�\�\�2�����T�%:�%:�;�����T�%5�%5�6�	
�
����d����>�R�Z�Z�^�^�,?��E��L��I�
�Z�Z�^�^�;�S�
A�S�
H��+�+�B�/�/�(�8�=�=��(��,�,rc�
�|j|j�|d|j|jd�|��}tjjdd�dk7r
t
�|j|j��y)N)r�rDr�r�)�instancerW)	�check_schemar�r$rrr�
breakpointr�r�)r?rIr]�	validators    rr�z_Test.validate�so�����t�{�{�+��
��;�;��]�]�
��
�	�
�:�:�>�>�-�s�3�s�:��L����D�I�I��.rc��ttj�5|j|��ddd�y#1swYyxYw)N)rI)rrr�r�)r?rIs  rr�z_Test.validate_ignoring_errorss*��
�j�0�0�
1��M�M�I�M�.�2�
1�
1�s�6�?)rSrTrUrVr�r��propertyr�rpr�r�rWrrr�r��sh����
�L�����

�I�$�$��K�3�3��G�Z��5��
��
�'8�-�2	/�/rr�c�F�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.
    �rS)r-�	_getframe�	f_globalsrWrrr{r{s���=�=���%�%�j�1�1r)'�__doc__�
__future__r�collections.abcrr�
contextlibr�	functoolsr�pathlibr�typingr	r
rr�rer0r-rx�attrsrrr5r
�referencing.jsonschema�pyperf�jsonschema.validatorsrr�compiler�rrrOr�r�r{rWrr�<module>r�s����#�-����%��	�	��
��� ����-���b�j�j��%���$�0
�0
��0
�f�1�1��1�h�����B�U��E/�E/��E/�P
2r

Youez - 2016 - github.com/yon3zu
LinuXploit