HEX
Server: LiteSpeed
System: Linux altar40.supremepanel40.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: sescorpcl (4477)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib64/python3.6/site-packages/simplejson/tests/__pycache__/test_fail.cpython-36.pyc
3

�8�]��:@s�ddlZddlmZddlZddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<g:Zd=d>d?�ZGd@dA�dAe�ZdS)B�N)�TestCasez<"A JSON payload should be an object or array, not a string."z["Unclosed array"z%{unquoted_key: "keys must be quoted"}z["extra comma",]z["double extra comma",,]z[   , "<-- missing value"]z["Comma after the close"],z["Extra close"]]z{"Extra comma": true,}z:{"Extra value after close": true} "misplaced quoted value"z{"Illegal expression": 1 + 2}z{"Illegal invocation": alert()}z+{"Numbers cannot have leading zeroes": 013}z{"Numbers cannot be hex": 0x14}z"["Illegal backslash escape: \x15"]z[\naked]z"["Illegal backslash escape: \017"]z2[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]z{"Missing colon" null}z{"Double colon":: null}z {"Comma instead of colon", null}z!["Colon instead of comma": false]z["Bad value", truth]z['single quote']z["	tab	character	in	string	"]z&["tab\   character\   in\  string\  "]z["line
break"]z["line\
break"]z[0e]z[0e+]z[0e+-1]z({"Comma instead if closing brace": true,z["mismatch"}z$["AZ control characters in string"]�{z{]z{"foo": "bar"]z
{"foo": "bar"ZnulZnulx�-z-xz-ez-e0z	-Infinitez-InfZInfinitZInfiniteZNaMZNuNZfalsyZfalZtrugZtruZ1eZ1exz1e-z1e-xzwhy not have a string payload?z,spec doesn't specify any nesting limitations)��c@s$eZdZdd�Zdd�Zdd�ZdS)�TestFailc
Csnxhtt�D]\\}}|d}|tkr.tj|�q
ytj|�Wntjk
rRYq
X|jd||f�q
WdS)Nrz$Expected failure for fail%d.json: %r)�	enumerate�JSONDOCS�SKIPS�json�loads�JSONDecodeError�fail)�self�idx�doc�r�!/usr/lib64/python3.6/test_fail.py�
test_failuresms
zTestFail.test_failurescCs�x�dD]�}ytj|�Wn|tjk
rdtj�d}|j|jd�|j|jd�|j|jd�Yqt	k
r�tj�d}|j
d||f�YqX|j
d�qWdS)N�[,]r�z!Unexpected exception raised %r %sz Unexpected success parsing '[,]')rr)rrr
�sys�exc_info�assertEqual�pos�lineno�colno�	Exceptionr)rr�errr�test_array_decoder_issue46zs
z#TestFail.test_array_decoder_issue46cCs�d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6g}x�|D]�\}}}ytj|�Wn�tjk
�r�tj�d}|j|jdt|��|d!|j||f�|j|j|d"|j||f�Yq.t	k
�r�tj�d}|j
d#||f�Yq.X|j
d$|f�q.WdS)7N��Expecting valuer�[�Expecting value or ']'r�[42�Expecting ',' delimiter��[42,��["�Unterminated string starting at�["spam�["spam"��["spam",�r�1Expecting property name enclosed in double quotes�{"�{"spam�{"spam"�Expecting ':' delimiter�{"spam":�
{"spam":42�
�{"spam":42,��"�"spam�[,z%r doesn't start with %r for %rzpos %r != %r for %rz!Unexpected exception raised %r %szUnexpected success parsing '%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/)rr0r)r1r*r)r2r*r)r3r4r-)r5r!r/)r6r%r7)r8r0r9)r:r*r)r;r*r)r<r!r)rrr
rrr�msg�lenrrr)rZ
test_cases�datar=rrrrr�test_truncated_input�sFzTestFail.test_truncated_inputN)�__name__�
__module__�__qualname__rrr@rrrrrls
r)rZunittestrZ
simplejsonrr	r
rrrrr�<module>s~