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__/test_cli.cpython-312.opt-1.pyc
�

�% g�o���ddlmZmZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZddlZddlZddlZddlZddlZddlZdd	lmZmZdd
lmZmZmZddlmZmZej<�5ej>d�dd
lm Z ddd�d�Z!d�Z"d�Z#Gd�de�Z$Gd�de�Z%Gd�de�Z&y#1swY�4xYw)�)�redirect_stderr�redirect_stdout)�metadata)�StringIO)�JSONDecodeError)�Path)�dedent)�TestCaseN)�Draft4Validator�Draft202012Validator)�SchemaError�ValidationError�_RefResolutionError)�_LATEST_VERSION�validate�ignore)�clic�H��tt����G�fd�d�}|S)Nc�.��eZdZd�Z�fd�Zed��Zy)�%fake_validator.<locals>.FakeValidatorc��y�N�)�self�args�kwargss   �>/usr/lib/python3.12/site-packages/jsonschema/tests/test_cli.py�__init__z.fake_validator.<locals>.FakeValidator.__init__ s���c�,���r�j�SgSr)�pop)r�instance�errorss  �r�iter_errorsz1fake_validator.<locals>.FakeValidator.iter_errors#s�����z�z�|�#��Irc��yrr�r�schemas  r�check_schemaz2fake_validator.<locals>.FakeValidator.check_schema(s��rN)�__name__�
__module__�__qualname__rr$�classmethodr()r#s�r�
FakeValidatorrs!���	�	�

�	�
�	rr-)�list�reversed)r#r-s` r�fake_validatorr0s$���
�(�6�"�
#�F����rc����fd�}|S)Nc�V���j|�}|�t|��t|�Sr)�get�FileNotFoundErrorr)�path�contents�all_contentss  �r�openzfake_open.<locals>.open0s/����#�#�D�)����#�D�)�)���!�!rr)r7r8s` r�	fake_openr9/s���"�
�Krc��	tj|�td��#t$r}t	|�cYd}~Sd}~wwxYw)Nz.Tried and failed to capture a JSON dump error.)�json�loads�RuntimeErrorr�str)�non_json�errors  r�_message_forrA8s>��M��
�
�8���K�L�L�����5�z����s�"�	A�
;�A�Ac�.�eZdZde�dfd�Zd0d�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z!d!�Z"d"�Z#d#�Z$d$�Z%d%�Z&d&�Z'd'�Z(d(�Z)d)�Z*d*�Z+d+�Z,d,�Z-d-�Z.d.�Z/d/�Z0y)1�TestCLINrc��tj|�}|j|�|jt	td��t|xsi�t_	t�t�}}tj||||��}	t`|j|	|td|�d|	�d|j��d|j��d�	���|j�|j�fS#t`wxYw)	Nr8)�stdin�stdout�stderrz.
                    Expected an exit code of z != z.

                    stdout: z

                    stderr: z
                )�msg)r�
parse_args�update�assertFalse�hasattrr9r8r�run�assertEqualr	�getvalue)
r�argv�filesrE�	exit_code�override�	argumentsrFrG�actual_exit_codes
          r�run_clizTestCLI.run_cliBs����N�N�4�(�	�����"������f�-�.��U�[�b�)���		�%�Z���F�F�"�w�w�����	 ��������i�V�.�.7�[��=M�<N�O�#�_�_�.�/�0�#�_�_�.�/�0��.�	�
	
���� �&�/�/�"3�3�3����s�-C8�8Dc�p�|j|jdi|��t|�t|�f�y)Nr)rNrVr	)rrFrGrs    r�
assertOutputszTestCLI.assertOutputsbs1������D�L�L�"�6�"�
�F�^�V�F�^�,�	
rc��tdd��}|jtdtj|j
���t
|g�gd�dd�	�y)
N�I am an error!��r"�*{"does not": "matter since it is stubbed"}��some_schema�
some_instance��-ir`r_��12: I am an error!
�rQ�	validatorrPrRrG�rrX�dictr;�dumpsr"r0�rr@s  r�test_invalid_instancezTestCLI.test_invalid_instancehsR��� 0�2�>������H�"�j�j����8��%�e�W�-�7��)�	�	
rc��tdd��}|jtdtj|j
���t
|g�gd�dd�	�y)
NrZr[r\r]r^�rbr`�--output�prettyr_rcz�                ===[ValidationError]===(some_instance)===

                I am an error!
                -----------------------------
            rergrjs  r�#test_invalid_instance_pretty_outputz+TestCLI.test_invalid_instance_pretty_outputwsT��� 0�2�>������H�"�j�j����8��%�e�W�-�M���	�	
rc��tdd��}|jtdtj|j
���t
|g�gd�dd�	�y)
NrZr[r\r]r^)rn�plainrbr`r_rcrdrergrjs  r�+test_invalid_instance_explicit_plain_outputz3TestCLI.test_invalid_instance_explicit_plain_output�sR��� 0�2�>������H�"�j�j����8��%�e�W�-�L��)�	�	
rc��d}td|��}td|��}|jtdtj|���t||g�gd�dd	�
�y)Nr[�First errorr\�Second errorr]r^rarczM                12: First error
                12: Second error
            re�rrXrhr;rir0�rr"�first�seconds    r�%test_invalid_instance_multiple_errorsz-TestCLI.test_invalid_instance_multiple_errors�sb�����
��A�� ��(�C������H�"�j�j��2��%�e�V�_�5�7���	�	
rc��d}td|��}td|��}|jtdtj|���t||g�gd�dd	�
�y)Nr[rur\rvr]r^rmrca                ===[ValidationError]===(some_instance)===

                First error
                -----------------------------
                ===[ValidationError]===(some_instance)===

                Second error
                -----------------------------
            rerwrxs    r�3test_invalid_instance_multiple_errors_pretty_outputz;TestCLI.test_invalid_instance_multiple_errors_pretty_output�sb�����
��A�� ��(�C������H�"�j�j��2��%�e�V�_�5�M��	�	�	
rc	��d}td|��td|��g}d}td|��g}|jtdtj|�tj|���t||�gd	�d
d��y)
Nr[�An errorr\�
Another error�foo�BOOMr]�r_�some_first_instance�some_second_instance)rbr�rbr�r_rcze                12: An error
                12: Another error
                foo: BOOM
            rerw�r�first_instance�first_errors�second_instance�
second_errorss     r�test_multiple_invalid_instancesz'TestCLI.test_multiple_invalid_instances�s������J��@��O�n�E�
�� ��(��/�J�K�
�����H�$(�J�J�~�$>�%)�Z�Z��%@��
%�\�=�A����	�	
rc	��d}td|��td|��g}d}td|��g}|jtdtj|�tj|���t||�gd	�d
d��y)
Nr[rr\r�r�r�r]r�)rnrorbr�rbr�r_rca�                ===[ValidationError]===(some_first_instance)===

                An error
                -----------------------------
                ===[ValidationError]===(some_first_instance)===

                Another error
                -----------------------------
                ===[ValidationError]===(some_second_instance)===

                BOOM
                -----------------------------
            rerwr�s     r�-test_multiple_invalid_instances_pretty_outputz5TestCLI.test_multiple_invalid_instances_pretty_output�s������J��@��O�n�E�
�� ��(��/�J�K�
�����H�$(�J�J�~�$>�%)�Z�Z��%@��
%�\�=�A���
�!	�	
rc	��d}td|��td|��g}d}td|��g}|jtdtj|�tj|���t||�gd	�d
d��y)
Nr[rr\r�r�r�r]r�)�--error-format�&:{error.message}._-_.{error.instance}:rbr�rbr�r_rcz5:An error._-_.12::Another error._-_.12::BOOM._-_.foo:rerwr�s     r�test_custom_error_formatz TestCLI.test_custom_error_formats������J��@��O�n�E�
�� ��(��/�J�K�
�����H�$(�J�J�~�$>�%)�Z�Z��%@��
%�\�=�A���J�!	�	
rc�D�|jtd��dgdd��y)Nz{"type": 12}�r_r_rc�O                12: 12 is not valid under any of the given schemas
            �rQrPrRrG�rXrh�rs r�test_invalid_schemazTestCLI.test_invalid_schema.s*������>�2�����	�	
rc	�*�ddi}|jt�5}t|d��ddd�tj�}|jt
tj|���gd�ddt|�zd	z�
�y#1swY�bxYw)N�typer[��r'r"r��rnror_rc�%===[SchemaError]===(some_schema)===

�
-----------------------------
r��	�assertRaisesr
rr>�	exceptionrXrhr;ri�rr'�er@s    r�!test_invalid_schema_pretty_outputz)TestCLI.test_invalid_schema_pretty_output9s����"���
�
�
�{�
+�q��F�R�0�,��A�K�K� ������4�:�:�f�#5�6�6��9��e�*��5�6�
	�
	
�	,�
+�s�B	�	Bc�D�|jtd��dgdd��y)Nz{"type": 12, "items": 57}r�r_rczF                57: 57 is not of type 'object', 'boolean'
            r�r�r�s r�#test_invalid_schema_multiple_errorsz+TestCLI.test_invalid_schema_multiple_errorsLs+������#>�?�����	�	
rc	�,�ddd�}|jt�5}t|d��ddd�tj�}|jt
tj|���gd�dd	t|�zd
z��y#1swY�bxYw)Nr[�9)r��itemsr�r�r�r�rcr�r�r�r�r�s    r�1test_invalid_schema_multiple_errors_pretty_outputz9TestCLI.test_invalid_schema_multiple_errors_pretty_outputWs����r�*��
�
�
�{�
+�q��F�R�0�,��A�K�K� ������4�:�:�f�#5�6�6��9��e�*��5�6�
	�
	
�	,�
+�s�B
�
Bc�H�|jtdd��gd�dd��y)	zv
        "Validating" an instance that's invalid under an invalid schema
        just shows the schema error.
        z{"type": 12, "minimum": 30}�13r^rarcr�r�Nr�r�s r�)test_invalid_schema_with_invalid_instancez1TestCLI.test_invalid_schema_with_invalid_instancejs2��
	
����9�"��8���	�	
rc	�X�dddd�}}|jt�5}t||��ddd�tj�}|jt
tj|�tj|���gd�dd	t|�zd
z��y#1swY�vxYw)N�
r[��r��minimumr�r^�rnrorbr`r_rcr�r�r�r�)rr"r'r�r@s     r�7test_invalid_schema_with_invalid_instance_pretty_outputz?TestCLI.test_invalid_schema_with_invalid_instance_pretty_output|s�����r�:�&��
�
�
�{�
+�q��F�X�6�,��A�K�K� ������ �J�J�v�.�"�j�j��2��N��9��e�*��5�6�	�
	
�	,�
+�s�B � B)c
�z�|jtddd��gd�ddjtd����y)	Nz{"minimum": 30}�not valid JSON!�12)r_r�r�)rbr�rbr�r_rczw                Failed to parse 'first_instance': {}
                12: 12 is less than the minimum of 30
            r�)rXrh�formatrAr�s r�-test_invalid_instance_continues_with_the_restz5TestCLI.test_invalid_instance_continues_with_the_rest�sG������-�0� $��
�����|�$5�6�7�!	�	
rc���dddd�}}|jt�5t||��ddd�|jt	tj|���gd�dd	�
�y#1swY�>xYw)Nr�r[r�r�r�r�)r�r�r_rcz7:12 is not valid under any of the given schemas._-_.12:r�)r�r
rrXrhr;ri)rr"r's   r�1test_custom_error_format_applies_to_schema_errorsz9TestCLI.test_custom_error_format_applies_to_schema_errors�si����r�:�&��
�
�
�{�
+��F�X�6�,�	
����4�:�:�f�#5�6��
�L�	�
	
�,�
+�s�A(�(A1c	�f�d}|jtd|��gd�ddt|��d���y)	Nr��{}r^rarcz1                Failed to parse 'some_instance': �
            r��rXrhrA�rr"s  r�test_instance_is_invalid_JSONz%TestCLI.test_instance_is_invalid_JSON�sE��$������4�x�@�7��2�2>�x�2H�1I�J
��	�	
rc��|jtdd��gd�d��\}}|j|�|jd|�|j	d|�y)	Nr�r�r^r�rc�rQrPrRz7(some_instance)===

Traceback (most recent call last):
r_�rVrhrK�assertIn�assertNotIn�rrFrGs   r�+test_instance_is_invalid_JSON_pretty_outputz3TestCLI.test_instance_is_invalid_JSON_pretty_output�sd������ �/��
N��&�	
����	
���� ��
�
�H��	
�	
�����/rc
�v�d}|jtd��t|�dgddt|��d���y)	Nr�r�r�r_rcz)                Failed to parse <stdin>: r�)rQrErPrRrG)rXrhrrAr�s  r�&test_instance_is_invalid_JSON_on_stdinz.TestCLI.test_instance_is_invalid_JSON_on_stdin�sM��$������4�(��8�$����*�*6�x�*@�)A�B
��	�
	
rc���|jtd��td�gd�d��\}}|j|�|j	d|�|jd|�y)	Nr�r�r�r�rc)rQrErPrRz1(<stdin>)===

Traceback (most recent call last):
r_)rVrhrrKr�r�r�s   r�4test_instance_is_invalid_JSON_on_stdin_pretty_outputz<TestCLI.test_instance_is_invalid_JSON_on_stdin_pretty_output�sd������4�(��,�-�6��
&�
����	
���� ��
�
�B��	
�	
�����/rc	�b�d}|jt|��dgddt|��d���y)Nr�r�r_rc�/                Failed to parse 'some_schema': r�r�r�r&s  r�test_schema_is_invalid_JSONz#TestCLI.test_schema_is_invalid_JSON�sE��"������6�*����0�0<�V�0D�/E�F
��
	�		
rc��|jtd��gd�d��\}}|j|�|jd|�y)Nr�r�r�rcr��5(some_schema)===

Traceback (most recent call last):
)rVrhrKr�r�s   r�)test_schema_is_invalid_JSON_pretty_outputz1TestCLI.test_schema_is_invalid_JSON_pretty_outputsJ������#4�5�6��&�
����	
���� ��
�
�F��	
rc	�j�d\}}|jt||��dgddt|��d���y)	�M
        Only the schema error is reported, as we abort immediately.
        )r��also not valid JSON!r^r_rcr�r�r�Nr��rr'r"s   r�.test_schema_and_instance_are_both_invalid_JSONz6TestCLI.test_schema_and_instance_are_both_invalid_JSONsO��E��������6��B����0�0<�V�0D�/E�F
��
	�		
rc��|jtdd��gd�d��\}}|j|�|jd|�|j	d|�y	)
r�r�r�r^r�rcr�r�r`Nr�r�s   r�<test_schema_and_instance_are_both_invalid_JSON_pretty_outputzDTestCLI.test_schema_and_instance_are_both_invalid_JSON_pretty_output"sf������-�4��
N��&�	
����	
���� ��
�
�F��	
�	
����&�1rc�F�|jtd��gd�dd��y)Nr�r�)rb�nonexisting_instancer_rczC                'nonexisting_instance' does not exist.
            r�r�r�s r�test_instance_does_not_existz$TestCLI.test_instance_does_not_exist7s(������4�(�>���	�	
rc�F�|jtd��gd�dd��y)Nr�r�)rnrorbr�r_rcz�                ===[FileNotFoundError]===(nonexisting_instance)===

                'nonexisting_instance' does not exist.
                -----------------------------
            r�r�r�s r�*test_instance_does_not_exist_pretty_outputz2TestCLI.test_instance_does_not_exist_pretty_outputBs,������4�(����	�	
rc�.�|jdgdd��y)N�nonexisting_schemarc�%'nonexisting_schema' does not exist.
�rPrRrG�rXr�s r�test_schema_does_not_existz"TestCLI.test_schema_does_not_existTs!�����&�'��;�		�	
rc�0�|jgd�dd��y)N)rnror�rc��                ===[FileNotFoundError]===(nonexisting_schema)===

                'nonexisting_schema' does not exist.
                -----------------------------
            r�r�r�s r�(test_schema_does_not_exist_pretty_outputz0TestCLI.test_schema_does_not_exist_pretty_output\s �����=���		�
	
rc�0�|jgd�dd��y)N)rbr�r�rcr�r�r�r�s r�&test_neither_instance_nor_schema_existz.TestCLI.test_neither_instance_nor_schema_existis�����E��;�		�	
rc�0�|jgd�dd��y)N)rnrorbr�r�rcr�r�r�r�s r�4test_neither_instance_nor_schema_exist_pretty_outputz<TestCLI.test_neither_instance_nor_schema_exist_pretty_outputqs$��������	�	
rc�H�|jtdd��gd�dd��y�Nr�r^rar��rQrPrFrGr�r�s r�test_successful_validationz"TestCLI.test_successful_validation��(������4�t�<�7���		�	
rc�H�|jtdd��gd�dd��y�Nr�r^r�z"===[SUCCESS]===(some_instance)===
r�r�r�r�s r�(test_successful_validation_pretty_outputz0TestCLI.test_successful_validation_pretty_output��(������4�t�<�M�8��		�	
rc�X�|jtd��td�dgdd��y)Nr�r�r_r��rQrErPrFrG�rXrhrr�s r�#test_successful_validation_of_stdinz+TestCLI.test_successful_validation_of_stdin�s/������4�(��4�.�����	�	
rc�Z�|jtd��td�gd�dd��y)Nr�r�r�z===[SUCCESS]===(<stdin>)===
r�r�r�r�s r�1test_successful_validation_of_stdin_pretty_outputz9TestCLI.test_successful_validation_of_stdin_pretty_output�s-������4�(��4�.�6�2��	�	
rc�H�|jtdd��gd�dd��yr�r�r�s r�-test_successful_validation_of_just_the_schemaz5TestCLI.test_successful_validation_of_just_the_schema�r�rc�H�|jtdd��gd�dd��yr�r�r�s r�;test_successful_validation_of_just_the_schema_pretty_outputzCTestCLI.test_successful_validation_of_just_the_schema_pretty_output�r�rc��tjd��}|j�|jtj
|j�t|j�}|jd�d|j�d�}|jt|d��dd	d
|jj�dzdgd
d
��y)NF��delete�-{"definitions": {"num": {"type": "integer"}}}�
{"$ref": "�#/definitions/num"}�1r^rbr`�
--base-uri�/r_r�r��
�tempfile�NamedTemporaryFile�close�
addCleanup�os�remove�namer�
write_textrXrh�parent�as_uri�r�ref_schema_file�ref_pathr's    r�0test_successful_validation_via_explicit_base_uriz8TestCLI.test_successful_validation_via_explicit_base_uri�s���"�5�5�U�C����������	�	�?�#7�#7�8���,�,�-�����K�L��x�}�}�o�-A�B������6��=��o��h�o�o�4�4�6��<���
��	�		
rc��tjd��}|j�|jtj
|j�t|j�}|jd�d|j�d�}|jt|d��dd	d
|jj�dzdgd
dd��y)NFrrrrz"1"r^rbr`rrr_rcr�z 1: '1' is not of type 'integer'
�rQrPrRrFrGr	rs    r�2test_unsuccessful_validation_via_explicit_base_uriz:TestCLI.test_unsuccessful_validation_via_explicit_base_uri�s���"�5�5�U�C����������	�	�?�#7�#7�8���,�,�-�����K�L��x�}�}�o�-A�B������6��?��o��h�o�o�4�4�6��<���
��6�	�
	
rc	�V�d}d}|jt�5}|jt||��dddt	j
�j
�dg��ddd�tj�}|jtj�d	�|�y#1swY�BxYw)
Nz4{"$ref": "someNonexistentFile.json#definitions/num"}rr^rbr`rr_�rQrPzsomeNonexistentFile.json')r�rrXrhr�cwdrr>r�r�r�sep�rr'r"r�r@s     r�,test_nonexistent_file_with_explicit_base_uriz4TestCLI.test_nonexistent_file_with_explicit_base_uri�s���G����
�
�
�2�
3�q����� &�"*��
�/� �$�(�(�*�"3�"3�"5�!��
�

�4��A�K�K� ���
�
����� 9�:�E�B�4�
3�s�AB�B(c���d}d}|jt�5}|jt||��gd���ddd�t	j
�}|j
|d�y#1swY�1xYw)Nz${"$ref": "foo.json#definitions/num"}rr^)rbr`rznot@UR1r_rzunknown url type: 'foo.json')r�rrXrhr>r�rNrs     r�test_invalid_explicit_base_uriz&TestCLI.test_invalid_explicit_base_uri�su��7����
�
�
�2�
3�q����� &�"*���
�

�4��A�K�K� ������1�	
�4�
3�s�!A+�+A4c�~�|jtt�|jt	dd��gd�ddd��y)	Nz{"const": "check"}z"a"r^rarcr�za: 'check' was expected
r)�assertIsrrrXrhr�s r�=test_it_validates_using_the_latest_validator_when_unspecifiedzETestCLI.test_it_validates_using_the_latest_validator_when_unspecifieds=��	
�
�
�*�O�<�����#7�u�M�7���.�	�	
rc�R�d}d}|jt||��gd�ddd��y	)
zG
        Specifically, `const` validation applies for Draft 7.
        z�
            {
                "$schema": "http://json-schema.org/draft-07/schema#",
                "const": "check"
            }
        �"foo"r^rarcr�zfoo: 'check' was expected
rNr�r�s   r�-test_it_validates_using_draft7_when_specifiedz5TestCLI.test_it_validates_using_draft7_when_specifieds9����������6��B�7���0�	�	
rc�P�d}d}|jt||��gd�dd��y)zP
        Specifically, `const` validation *does not* apply for Draft 4.
        z�
            {
                "$schema": "http://json-schema.org/draft-04/schema#",
                "const": "check"
            }
            r'r^rar�r�Nr�r�s   r�-test_it_validates_using_draft4_when_specifiedz5TestCLI.test_it_validates_using_draft4_when_specified*s6����������6��B�7���		�	
r)r�r�)1r)r*r+rrVrXrkrprsr{r}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr r"r%r(r*rrrrCrCAs����h�j�A�4�@
�

�
�(

�
�*
�6
�>'
�R
�8	
�
�&	
�
�&
�$
�,
�(
�$
�0�$

�0� 
�
�
� 2�*	
�
�$
�
�
�
�"
�
�
�
�
�
�
�*
�,C�&
�*
� 
�&
rrCc�8�eZdZe�Zd�Zd�Zd�Zd�Zd�Z	y)�
TestParserc�p�tjgd��}|j|d|j�y)N)�--validatorz2jsonschema.tests.test_cli.TestParser.FakeValidator�
--instance�mem://some/instance�mem://some/schemarf)rrIr$r-�rrTs  r�2test_find_validator_by_fully_qualified_object_namez=TestParser.test_find_validator_by_fully_qualified_object_nameAs0���N�N�
�
�	�	
�
�
�i��,�d�.@�.@�Arc�d�tjgd��}|j|dt�y)N)r.rr/r0r1rf)rrIr$rr2s  r�!test_find_validator_in_jsonschemaz,TestParser.test_find_validator_in_jsonschemaLs*���N�N�
�
�	�	
�
�
�i��,�o�>rc�h�t�t�}}t|�5t|�5|jt�5tj|�ddd�ddd�ddd�|j�|j�fS#1swY�9xYw#1swY�=xYw#1swY�AxYwr)rrrr��
SystemExitrrIrO)rrPrFrGs    r�cli_output_forzTestParser.cli_output_forVsy��!��X�Z���
�V�
$�o�f�&=��"�"�:�.����t�$�/�'>�
$���� �&�/�/�"3�3�3�/�.��'>�&=��
$�
$�s:�B(�B�B�B� B(�B�B�B%	�!B(�(B1c�v�|jddd�\}}|jd|�|j|�y)Nrnr�r1zinvalid choice: 'foo'�r8r�rKr�s   r�test_unknown_outputzTestParser.test_unknown_output]s=���,�,����
����	
�
�
�-�v�6����� rc�z�|jddddd�\}}|jd|�|j|�y)Nrnror�r�r1z3--error-format can only be used with --output plainr:r�s   r�test_useless_error_formatz$TestParser.test_useless_error_formatesG���,�,����e��
����
	
�
�
�A��	
�	
���� rN)
r)r*r+r0r-r3r5r8r;r=rrrr,r,=s$��"�$�M�	B�?�4�!�
!rr,c��eZdZd�Zd�Zd�Zy)�TestCLIIntegrationc��tjtjddddgtj��}|jd|�y)N�-m�pip�show�
jsonschema�rGsLicense: MIT)�
subprocess�check_output�sys�
executable�STDOUTr�)r�outputs  r�test_licensezTestCLIIntegration.test_licensess=���(�(�
�^�^�T�5�&�,�?��$�$�
��	
�
�
�o�v�.rc��tjtjdddddgtj��}|jd�j
�}|j|tjd��y)Nz-WrrArDz	--versionrEzutf-8)
rFrGrHrIrJ�decode�striprNr�version)rrPs  r�test_versionzTestCLIIntegration.test_versionzsc���)�)�
�^�^�T�8�T�<��M��$�$�
���.�.��)�/�/�1������(�"2�"2�<�"@�Arc��tjtjddgtj��}tjtjdddgtj��}|j||�y)NrArDrEz--help)rFrGrHrIrJrN)rrK�output_for_helps   r�#test_no_arguments_shows_usage_notesz6TestCLIIntegration.test_no_arguments_shows_usage_notes�sf���(�(�
�^�^�T�<�0��$�$�
��%�1�1�
�^�^�T�<��:��$�$�
��	
�����1rN)r)r*r+rLrQrTrrrr?r?rs��/�B�	2rr?)'�
contextlibrr�	importlibr�iorr;r�pathlibr�textwrapr	�unittestr
rrFrHr
�warningsrDrr�jsonschema.exceptionsr
rr�jsonschema.validatorsrr�catch_warnings�simplefilterrr0r9rArCr,r?rrr�<module>r`s���7��� �����	��
���<���
<��X�����H���(�#���
�&�M�y
�h�y
�x2!��2!�j2��2�w��s�0B<�<C

Youez - 2016 - github.com/yon3zu
LinuXploit