
    `j                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ	 ddl
Z
 G d	 d
ej                  Zedk    r ej                     dS dS )z!Fuzz tests for the parser module.    )parser)	testutils)example)given)settings)
strategiesNc                   B   e Zd Z ed           e ej        d                     ed           ed           ed           ed           ed	           ed
           ed           ed           ed           ed           ed           ed           ed           ed           ed           ed           ed           ed           ed           ed           ed          d                                                                                                                                                                                                                                                                                     ZdS )ParserFuzzTesti'  )max_examples   )min_sizeTruez"test\t\t\a\\a"z "test\t\t\a\\a"   z"(1, 2)"z(1, 2)z(1,                   2)z(1,       2) za,b,c,dz	(a,b,c,d)z	[a,b,c,d]z	{a,b,c,d}ztest:(a,b,c,d)z{test:(a,b,c,d)}z{test:a,b,c,d}z{test:a,b:(c,d)}z0,#zA#00000   ze[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0z1c                 J   	 t          j        |          }n6# t          $ r	 d|v rY d S  t          $ r t	          |          dk    rY d S  w xY w	 t          |          }t          |          }n# t          $ r Y d S w xY wt          j        ||          }dt          d |D                       z   |
                    d          z   |
                    d          z   d|
                    d          d	z   z  z   d|
                    d
          z  z   d|
                    d          z  z   }d|v r(|t	          |          |                    d          z
  z  }t          |t
                    s||
                    d          z  }d|vr|                     ||||||f           d S d S )N d      c              3   >   K   | ]}|                                 V  d S )N)isspace).0cs     Y/home/jworkman/hermes-web-chat/venv/lib/python3.11/site-packages/fire/parser_fuzz_test.py	<genexpr>z;ParserFuzzTest.testDefaultParseValueFuzz.<locals>.<genexpr>L   s*      ''AAIIKK''''''    "'   ,r   :\r   0{)r   DefaultParseValue	TypeErrorMemoryErrorlenstrUnicodeDecodeErrorLevenshteindistancesumcountindex
isinstanceassertLessEqual)selfvalueresultuvalueuresultr+   max_distances          r   testDefaultParseValueFuzzz(ParserFuzzTest.testDefaultParseValueFuzz   s   0'..ff   	5   	Uc			5zzfFgg   ff
 #GV44H	'''''''	(C	 ;;s++	, 	
U[[!"	# 	
U[[		
 	
EKK	  e||c%jj5;;s#3#333lfc"" 'ekk#&&&l %
8\$lFGDF F F F F s&    A
A
A
A- -
A;:A;N)	__name__
__module____qualname__r   r   sttextr   r7    r   r   r
   r
      s       85!			
76??
7
7!""
7:
78
7%&&
7?
79
7;
7;
7;
7
7
7
7
74==
73<<
79
76??
7?
7?'F 'F   ?  < =          '&   #"  ?   .'F 'F 'Fr   r
   __main__)__doc__firer   r   
hypothesisr   r   r   r   r;   r*   BaseTestCaser
   r8   mainr=   r   r   <module>rD      s    ( '                               ' ' ' ' ' '    @F @F @F @F @FY+ @F @F @FF z). r   