%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/jsonschema/tests/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/jsonschema/tests/__pycache__/test_cli.cpython-312.pyc

�

`��dBp��<�ddlmZmZddlmZddlmZddlmZddl	m
Z
ddlmZddlZddl
Z
ddlZddlZddlZ	ddlmZdd	lmZdd
lmZmZmZddlmZmZmZddlm Z m!Z!d
�Z"d�Z#d�Z$Gd�de�Z%Gd�de�Z&Gd�de�Z'y#e$rddlZY�XwxYw)�)�redirect_stderr�redirect_stdout)�StringIO)�JSONDecodeError)�Path)�dedent)�TestCaseN)�metadata)�m)�Draft4Validator�Draft202012Validator�cli)�RefResolutionError�SchemaError�ValidationError)�_LATEST_VERSION�validatec�R��tt����G�fd�dt�}|S)Nc�.��eZdZd�Z�fd�Zed��Zy)�%fake_validator.<locals>.FakeValidatorc��y�N�)�self�args�kwargss   �;/usr/lib/python3/dist-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�
FakeValidatorr s!���	�	�

�	�
�	rr-)�list�reversed�object)r#r-s` r�fake_validatorr1s&���
�(�6�"�
#�F�����rc����fd�}|S)Nc�V���j|�}|�t|��t|�Sr)�get�FileNotFoundErrorr)�path�contents�all_contentss  �r�openzfake_open.<locals>.open1s/����#�#�D�)����#�D�)�)���!�!rr)r8r9s` r�	fake_openr:0s���"�
�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_forrB9s>��M��
�
�8���K�L�L�����5�z����s�"�	A�
;�A�Ac�8�eZdZe�e�dfd�Zd0d�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-�Z0d.�Z1y/)1�TestCLIrc
��tj|�}|j|�|jt	td��t|�t_	t�t�}}tj||||��}	t`|j|	|tdj||	|j�|j�����|j�|j�fS#t`wxYw)Nr9)�stdin�stdout�stderrz�
                    Expected an exit code of {} != {}.

                    stdout: {}

                    stderr: {}
                )�msg)
r�
parse_args�update�assertFalse�hasattrr:r9r�run�assertEqualr�format�getvalue)
r�argv�filesrF�	exit_code�override�	argumentsrGrH�actual_exit_codes
          r�run_clizTestCLI.run_cliCs����N�N�4�(�	�����"������f�-�.��U�#���		�%�Z���F�F�"�w�w�����	 ��������i�V���F��$��O�O�%��O�O�%�	�
.�	�	
� ��� �&�/�/�"3�3�3��%��s�-C9�9Dc�p�|j|jdi|��t|�t|�f�y)Nr)rOrXr)rrGrHrs    r�
assertOutputszTestCLI.assertOutputshs1������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��-irbra��12: I am an error!
�rS�	validatorrRrTrH�rrZ�dictr<�dumpsr"r1�rrAs  r�test_invalid_instancezTestCLI.test_invalid_instancensR��� 0�2�>������H�"�j�j����8��%�e�W�-�7��)�	�	
rc��tdd��}|jtdtj|j
���t
|g�gd�dd�	�y)
Nr\r]r^r_r`�rdrb�--output�prettyrarez�                ===[ValidationError]===(some_instance)===

                I am an error!
                -----------------------------
            rgrirls  r�#test_invalid_instance_pretty_outputz+TestCLI.test_invalid_instance_pretty_output}sT��� 0�2�>������H�"�j�j����8��%�e�W�-�M���	�	
rc��tdd��}|jtdtj|j
���t
|g�gd�dd�	�y)
Nr\r]r^r_r`)rp�plainrdrbrarerfrgrirls  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`rcrezM                12: First error
                12: Second error
            rg�rrZrjr<rkr1�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]rwr^rxr_r`rorea                ===[ValidationError]===(some_instance)===

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

                Second error
                -----------------------------
            rgryrzs    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_�ra�some_first_instance�some_second_instance)rdr�rdr�rareze                12: An error
                12: Another error
                foo: BOOM
            rgry�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]r�r^r�r�r�r_r�)rprqrdr�rdr�rarea�                ===[ValidationError]===(some_first_instance)===

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

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

                BOOM
                -----------------------------
            rgryr�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]r�r^r�r�r�r_r�)�--error-format�&:{error.message}._-_.{error.instance}:rdr�rdr�rarez5:An error._-_.12::Another error._-_.12::BOOM._-_.foo:rgryr�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}�rarare�O                12: 12 is not valid under any of the given schemas
            �rSrRrTrH�rZrj�rs r�test_invalid_schemazTestCLI.test_invalid_schema4s*������>�2�����	�	
rc	�*�ddi}|jt�5}t|d��ddd�tj�}|jt
tj|���gd�ddt|�zd	z�
�y#1swY�bxYw)N�typer]��r'r"r��rprqrare�%===[SchemaError]===(some_schema)===

�
-----------------------------
r��	�assertRaisesrrr?�	exceptionrZrjr<rk�rr'�erAs    r�!test_invalid_schema_pretty_outputz)TestCLI.test_invalid_schema_pretty_output?s����"���
�
�
�{�
+�	1�q��F�R�0�	1��A�K�K� ������4�:�:�f�#5�6�6��9��e�*��5�6�
	�
	
�		1�	1�s�B	�	Bc�D�|jtd��dgdd��y)Nz{"type": 12, "items": 57}r�rarezF                57: 57 is not of type 'object', 'boolean'
            r�r�r�s r�#test_invalid_schema_multiple_errorsz+TestCLI.test_invalid_schema_multiple_errorsRs+������#>�?�����	�	
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�rer�r�r�r�r�s    r�1test_invalid_schema_multiple_errors_pretty_outputz9TestCLI.test_invalid_schema_multiple_errors_pretty_output]s����r�*��
�
�
�{�
+�	1�q��F�R�0�	1��A�K�K� ������4�:�:�f�#5�6�6��9��e�*��5�6�
	�
	
�		1�	1�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`rcrer�r�Nr�r�s r�)test_invalid_schema_with_invalid_instancez1TestCLI.test_invalid_schema_with_invalid_instanceps2��
	
����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`�rprqrdrbrarer�r�r�r�)rr"r'r�rAs     r�7test_invalid_schema_with_invalid_instance_pretty_outputz?TestCLI.test_invalid_schema_with_invalid_instance_pretty_output�s�����r�:�&��
�
�
�{�
+�	7�q��F�X�6�	7��A�K�K� ������ �J�J�v�.�"�j�j��2��N��9��e�*��5�6�	�
	
�		7�	7�s�B � B)c
�z�|jtddd��gd�ddjtd����y)	Nz{"minimum": 30}�not valid JSON!�12)rar�r�)rdr�rdr�rarezw                Failed to parse 'first_instance': {}
                12: 12 is less than the minimum of 30
            r��rZrjrPrBr�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�rarez7:12 is not valid under any of the given schemas._-_.12:r�)r�rrrZrjr<rk)rr"r's   r�1test_custom_error_format_applies_to_schema_errorsz9TestCLI.test_custom_error_format_applies_to_schema_errors�sp����r�:�&��
�
�
�{�
+�	7��F�X�6�	7�	
����4�:�:�f�#5�6��
�L�	�
	
�	7�	7�s�A(�(A1c
�|�d}|jtd|��gd�ddjt|����y)Nr��{}r`rcrez@                Failed to parse 'some_instance': {}
            r�r��rr"s  r�test_instance_is_invalid_JSONz%TestCLI.test_instance_is_invalid_JSON�s>��$������4�x�@�7�����|�H�-�.�	�	
rc��|jtdd��gd�d��\}}|j|�|jd|�|j	d|�y)	Nr�r�r`r�re�rSrRrTz7(some_instance)===

Traceback (most recent call last):
ra�rXrjrL�assertIn�assertNotIn�rrGrHs   r�+test_instance_is_invalid_JSON_pretty_outputz3TestCLI.test_instance_is_invalid_JSON_pretty_output�sd������ �/��
N��&�	
����	
���� ��
�
�H��	
�	
�����/rc��d}|jtd��t|�dgddjt	|����y)Nr�r�r�rarez8                Failed to parse <stdin>: {}
            )rSrFrRrTrH)rZrjrrPrBr�s  r�&test_instance_is_invalid_JSON_on_stdinz.TestCLI.test_instance_is_invalid_JSON_on_stdin�sF��$������4�(��8�$�������|�H�-�.�	�
	
rc���|jtd��td�gd�d��\}}|j|�|j	d|�|jd|�y)	Nr�r�r�r�re)rSrFrRrTz1(<stdin>)===

Traceback (most recent call last):
ra)rXrjrrLr�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
�x�d}|jt|��dgddjt|����y)Nr�r�rare�>                Failed to parse 'some_schema': {}
            r�r�r&s  r�test_schema_is_invalid_JSONz#TestCLI.test_schema_is_invalid_JSON�s>��"������6�*�������|�F�+�,�	�		
rc��|jtd��gd�d��\}}|j|�|jd|�y)Nr�r�r�rer��5(some_schema)===

Traceback (most recent call last):
)rXrjrLr�r�s   r�)test_schema_is_invalid_JSON_pretty_outputz1TestCLI.test_schema_is_invalid_JSON_pretty_output
sJ������#4�5�6��&�
����	
���� ��
�
�F��	
rc
��d\}}|jt||��dgddjt|����y)�M
        Only the schema error is reported, as we abort immediately.
        )r��also not valid JSON!r`rarer�r�Nr��rr'r"s   r�.test_schema_and_instance_are_both_invalid_JSONz6TestCLI.test_schema_and_instance_are_both_invalid_JSONsH��E��������6��B�������|�F�+�,�	�		
rc��|jtdd��gd�d��\}}|j|�|jd|�|j	d|�y	)
r�r�r�r`r�rer�r�rbNr�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�)rd�nonexisting_instancerarezC                'nonexisting_instance' does not exist.
            r�r�r�s r�test_instance_does_not_existz$TestCLI.test_instance_does_not_exist=s(������4�(�>���	�	
rc�F�|jtd��gd�dd��y)Nr�r�)rprqrdr�rarez�                ===[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_outputHs,������4�(����	�	
rc�.�|jdgdd��y)N�nonexisting_schemare�%'nonexisting_schema' does not exist.
�rRrTrH�rZr�s r�test_schema_does_not_existz"TestCLI.test_schema_does_not_existZs!�����&�'��;�		�	
rc�0�|jgd�dd��y)N)rprqr�re��                ===[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_outputbs �����=���		�
	
rc�0�|jgd�dd��y)N)rdr�r�rer�r�r�r�s r�&test_neither_instance_nor_schema_existz.TestCLI.test_neither_instance_nor_schema_existos�����E��;�		�	
rc�0�|jgd�dd��y)N)rprqrdr�r�rer�r�r�r�s r�4test_neither_instance_nor_schema_exist_pretty_outputz<TestCLI.test_neither_instance_nor_schema_exist_pretty_outputws$��������	�	
rc�H�|jtdd��gd�dd��y�Nr�r`rcr��rSrRrGrHr�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�rar��rSrFrRrGrH�rZrjrr�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`rdrb�
--base-uri�/rar�r��
�tempfile�NamedTemporaryFile�close�
addCleanup�os�remove�namer�
write_textrZrj�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������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`rdrbrrrarer�z 1: '1' is not of type 'integer'
�rSrRrTrGrHr	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������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`rdrbrra�rSrRzsomeNonexistentFile.json')r�rrZrjr�cwdrr?r�r�r�sep�rr'r"r�rAs     r�,test_nonexistent_file_with_explicit_base_uriz4TestCLI.test_nonexistent_file_with_explicit_base_uri�s���G����
�
�
�1�
2�	�a����� &�"*��
�/� �$�(�(�*�"3�"3�"5�!��
�

�	��A�K�K� ���
�
����� 9�:�E�B�	�	�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`)rdrbrznot@UR1rarzunknown url type: 'foo.json')r�rrZrjr?r�rOrs     r�test_invalid_exlicit_base_uriz%TestCLI.test_invalid_exlicit_base_uri�s|��7����
�
�
�1�
2�	�a����� &�"*���
�

�	��A�K�K� ������1�	
�	�	�s�!A+�+A4c�~�|jtt�|jt	dd��gd�ddd��y)	Nz{"const": "check"}z"a"r`rcrer�za: 'check' was expected
r)�assertIsr
rrZrjr�s r�=test_it_validates_using_the_latest_validator_when_unspecifiedzETestCLI.test_it_validates_using_the_latest_validator_when_unspecified
s=��	
�
�
�*�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`rcrer�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`rcr�r�Nr�r�s   r�-test_it_validates_using_draft4_when_specifiedz5TestCLI.test_it_validates_using_draft4_when_specified0s6����������6��B�7���		�	
rN)r�r�)2r)r*r+rrrXrZrmrrrur}rr�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*rrrrDrDBs����#�X�Z�1�#4�J
�

�
�(

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

�0� 
�
�
� 2�*	
�
�$
�
�
�
�"
�
�
�
�
�
�
�*
�,C�&
�*
� 
�&
rrDc�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/schemarh)rrJr$r-�rrVs  r�2test_find_validator_by_fully_qualified_object_namez=TestParser.test_find_validator_by_fully_qualified_object_nameGs0���N�N�
�
�	�	
�
�
�i��,�d�.@�.@�Arc�d�tjgd��}|j|dt�y)N)r.rr/r0r1rh)rrJr$rr2s  r�!test_find_validator_in_jsonschemaz,TestParser.test_find_validator_in_jsonschemaRs*���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��
SystemExitrrJrQ)rrRrGrHs    r�cli_output_forzTestParser.cli_output_for\s���!��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)Nrpr�r1zinvalid choice: 'foo'�r8r�rLr�s   r�test_unknown_outputzTestParser.test_unknown_outputcs=���,�,����
����	
�
�
�-�v�6����� rc�z�|jddddd�\}}|jd|�|j|�y)Nrprqr�r�r1z3--error-format can only be used with --output plainr:r�s   r�test_useless_error_formatz$TestParser.test_useless_error_formatksG���,�,����e��
����
	
�
�
�A��	
�	
���� rN)
r)r*r+r1r-r3r5r8r;r=rrrr,r,Cs$��"�$�M�	B�?�4�!�
!rr,c��eZdZd�Zd�Zd�Zy)�TestCLIIntegrationc��tjtjddddgtj��}|jd|�y)N�-m�pip�show�
jsonschema�rHsLicense: MIT)�
subprocess�check_output�sys�
executable�STDOUTr�)r�outputs  r�test_licensezTestCLIIntegration.test_licenseys=���(�(�
�^�^�T�5�&�,�?��$�$�
��	
�
�
�o�v�.rc��tjtjdddgtj��}|jd�j
�}|j|tjd��y)NrArDz	--versionrEzutf-8)
rFrGrHrIrJ�decode�striprOr
�version)rrPs  r�test_versionzTestCLIIntegration.test_version�s_���)�)�
�^�^�T�<��=��$�$�
���.�.��)�/�/�1������(�"2�"2�<�"@�Arc��tjtjddgtj��}tjtjdddgtj��}|j||�y)NrArDrEz--help)rFrGrHrIrJrO)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?xs��/�B�	2rr?)(�
contextlibrr�iorr<r�pathlibr�textwrapr�unittestr	rrFrHr
�	importlibr
�ImportError�importlib_metadata�
pyrsistentrrDrr
r�jsonschema.exceptionsrrr�jsonschema.validatorsrrr1r:rBrDr,r?rrr�<module>r`s���7�� �����	��
��*�"��A�A���
<��&�M�~
�h�~
�B2!��2!�j2��2��S�*�)�*�s�B�	B�B

Zerion Mini Shell 1.0