U
    kufZ                     @   s   d Z ddlZddlmZmZ ddlZee e ej	ddde
 Zejee ee
 edd dZeeed	d
d Zdd ZedkrddlZe  dS )z
Fuzzing setup for OSS-Fuzz.

See https://github.com/google/oss-fuzz/tree/master/projects/jsonschema for the
other half of the setup here.
    N)given
strategiesF)	allow_nanZallow_infinityc                 C   s   t t  | S )N)r   dictionariestext)inner r   B/tmp/pip-unpacked-wheel-k94ccfep/jsonschema/tests/fuzz_validate.py<lambda>       r
   )baseextendZobj1obj2c                 C   sF   zt j| |d W n. t jjk
r*   Y n t jjk
r@   Y nX d S )N)instanceZschema)
jsonschemavalidate
exceptionsZValidationErrorZSchemaErrorr   r   r   r	   test_schemas   s    r   c                   C   s*   t   t jtjtjjdd t   d S )NT)Zenable_python_coverage)	atherisZinstrument_allSetupsysargvr   
hypothesisZfuzz_one_inputZFuzzr   r   r   r	   main&   s    r   __main__)__doc__r   r   r   r   r   Zone_ofZbooleansZintegersZfloatsr   ZPRIM	recursiver   DICTr   r   __name__r   r   r   r   r	   <module>   s,   	

	
