$69 GRAYBYTE WORDPRESS FILE MANAGER $64

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/python37/lib/python3.7/site-packages/jsonschema/tests/__pycache__/

HOME
Current File : /opt/alt/python37/lib/python3.7/site-packages/jsonschema/tests/__pycache__//test_cli.cpython-37.pyc
B

�pSew�@s�ddlmZddlZddlZddlZddlmZmZmZm	Z	ddl
mZddlm
Z
dd�ZGdd	�d	e�ZGd
d�de�ZdS)�)�TestCaseN)�Draft4Validator�ValidationError�cli�__version__)�NativeIO)�SchemaErrorcs$tt����G�fdd�dt�}|S)Ncs(eZdZdd�Z�fdd�Zdd�ZdS)z%fake_validator.<locals>.FakeValidatorc_sdS)N�)�self�args�kwargsr	r	�J/opt/alt/python37/lib/python3.7/site-packages/jsonschema/tests/test_cli.py�__init__sz.fake_validator.<locals>.FakeValidator.__init__cs�r���SgS)N)�pop)r
�instance)�errorsr	r
�iter_errorssz1fake_validator.<locals>.FakeValidator.iter_errorscSsdS)Nr	)r
�schemar	r	r
�check_schemasz2fake_validator.<locals>.FakeValidator.check_schemaN)�__name__�
__module__�__qualname__rrrr	)rr	r
�
FakeValidatorsr)�list�reversed�object)rrr	)rr
�fake_validatorsrc@s:eZdZe�ZdZdZdd�Zdd�Zdd�Z	d	d
�Z
dS)�
TestParserzfoo.jsonzschema.jsoncCs|jt_|�ttd�dS)N�open)�	fake_openrrZ
addCleanup�delattr)r
r	r	r
�setUp#szTestParser.setUpcCs>||jkrd}n ||jkr i}n|�d�|��tt�|��S)N�zWhat is {!r})�
instance_file�schema_fileZfail�formatr�json�dumps)r
�path�contentsr	r	r
r's

zTestParser.fake_opencCs.t�ddd|j|jg�}|�|d|j�dS)Nz--validatorz2jsonschema.tests.test_cli.TestParser.FakeValidatorz
--instance�	validator)r�
parse_argsr#r$�assertIsr)r
�	argumentsr	r	r
�2test_find_validator_by_fully_qualified_object_name0s
z=TestParser.test_find_validator_by_fully_qualified_object_namecCs,t�ddd|j|jg�}|�|dt�dS)Nz--validatorrz
--instancer*)rr+r#r$r,r)r
r-r	r	r
�!test_find_validator_in_jsonschema;s

z,TestParser.test_find_validator_in_jsonschemaN)rrrrrr#r$r!rr.r/r	r	r	r
rs	rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�TestCLIc	CsZt�t�}}|�t��8tjtdddiddiddigidgd	d
�||d�WdQRXdS)NZanyOfZminimum��type�string�requiredT�z{error.message})r*r�	instances�error_format)�stdout�stderr)rZassertRaisesrr�runr)r
r8r9r	r	r
�#test_draft3_schema_draft4_validatorGs
z+TestCLI.test_draft3_schema_draft4_validatorcCsXt�t�}}tjt�idgdd�||d�}|�|���|�|���|�|d�dS)Nr5z{error.message})r*rr6r7)r8r9r)rrr:r�assertFalse�getvalue�assertEqual)r
r8r9�	exit_coder	r	r
�test_successful_validation[sz"TestCLI.test_successful_validationcCsjtddd�}t�t�}}tjt|g�idgdd�||d�}|�|���|�|��d�|�|d�dS)NzI am an error!r5)rz"{error.instance} - {error.message})r*rr6r7)r8r9z1 - I am an error!)rrrr:rr<r=r>)r
�errorr8r9r?r	r	r
�test_unsuccessful_validationksz$TestCLI.test_unsuccessful_validationcCs�tddd�tddd�g}tddd�g}t�t�}}tjt||�iddgdd�||d	�}|�|���|�|��d
�|�|d�dS)N�9r5)r�8�7�z#{error.instance} - {error.message}	)r*rr6r7)r8r9z1 - 9	1 - 8	2 - 7	)rrrr:rr<r=r>)r
Zfirst_errorsZ
second_errorsr8r9r?r	r	r
�/test_unsuccessful_validation_multiple_instances|s
z7TestCLI.test_unsuccessful_validation_multiple_instancescCs8tjtjdddgtjd�}|�d���}|�|t�dS)Nz-m�
jsonschemaz	--version)r9zutf-8)	�
subprocess�check_output�sys�
executable�STDOUT�decode�stripr>r)r
�versionr	r	r
�test_version�s

zTestCLI.test_versionN)rrrr;r@rBrGrQr	r	r	r
r0Fs
r0)Zunittestrr&rIrKrHrrrrZjsonschema.compatrZjsonschema.exceptionsrrrr0r	r	r	r
�<module>s)


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 11.11 PM
root / linksafe
0755
__init__.cpython-37.opt-1.pyc
0.157 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
__init__.cpython-37.pyc
0.157 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
_helpers.cpython-37.opt-1.pyc
0.342 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
_helpers.cpython-37.pyc
0.342 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
_suite.cpython-37.opt-1.pyc
7.281 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
_suite.cpython-37.pyc
7.281 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_cli.cpython-37.opt-1.pyc
4.777 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_cli.cpython-37.pyc
4.777 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_exceptions.cpython-37.opt-1.pyc
15.417 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_exceptions.cpython-37.pyc
15.417 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_format.cpython-37.opt-1.pyc
3.675 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_format.cpython-37.pyc
3.675 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_jsonschema_test_suite.cpython-37.opt-1.pyc
5.794 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_jsonschema_test_suite.cpython-37.pyc
5.794 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_types.cpython-37.opt-1.pyc
6.362 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_types.cpython-37.pyc
6.362 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_validators.cpython-37.opt-1.pyc
55.177 KB
14 Nov 2023 1.06 PM
root / linksafe
0644
test_validators.cpython-37.pyc
55.177 KB
14 Nov 2023 1.06 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF