관리-도구
편집 파일: test_fail.cpython-311.pyc
� \�Dg6 � �P � d dl Z d dlmZ d dlZg d�Zddd�Z G d� de� � ZdS ) � N)�TestCase):z<"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"�nul�nulx�-z-xz-ez-e0z -Infinitez-Inf�Infinit�Infinite�NaM�NuN�falsy�fal�trug�tru�1e�1exz1e-z1e-xzwhy not have a string payload?z,spec doesn't specify any nesting limitations)� � c � � e Zd Zd� Zd� Zd� ZdS )�TestFailc � � t t � � D ]l\ }}|dz }|t v rt j |� � �( t j |� � | � d||fz � � �X# t j $ r Y �iw xY wd S )Nr z$Expected failure for fail%d.json: %r)� enumerate�JSONDOCS�SKIPS�json�loads�fail�JSONDecodeError)�self�idx�docs �|/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/simplejson/tests/test_fail.py� test_failureszTestFail.test_failuresm s� � �!�(�+�+� O� O�H�C����'�C��e�|�|�� �3����� O�� �3���� � � �@�C��:�M�N�N�N�N�� �'� � � ��� ���� O� Os �A-�-A?�>A?c �� � dD ]�} t j |� � | � d� � �-# t j $ rm t j � � d }| � |j d� � | � |j d� � | � |j d� � Y ��t $ r7 t j � � d }| � d|�d|��� � Y ��w xY wd S )N)�[,]r$ z Unexpected success parsing '[,]'r � �Unexpected exception raised � )r r r r �sys�exc_info�assertEqual�pos�lineno�colno� Exception)r r �es r! �test_array_decoder_issue46z#TestFail.test_array_decoder_issue46z s � �"� >� >�C� >�� �3���� � � �<�=�=�=�=�� �'� -� -� -��L�N�N�1�%��� � ����*�*�*�� � ���1�-�-�-�� � ���!�,�,�,�,�,�� H� H� H��L�N�N�1�%��� � � ����A�A�F�G�G�G�G�G� H���� >� >s �0�A9C+�+=C+�*C+c �* � g d�}|D �] \ }}} t j |� � | � d|�d�� � �6# t j $ r� t j � � d }| � |j d t |� � � ||j �d|�d|��� � | � |j |d|j �d|�d|��� � Y ��t $ r8 t j � � d }| � d |�d |��� � Y ��w xY wd S )N))� �Expecting valuer )�[zExpecting value or ']'r )z[42�Expecting ',' delimiter� )z[42,r3 � )z["�Unterminated string starting atr )z["spamr8 r )z["spam"r5 � )z["spam",r3 � )r z8Expecting property name enclosed in double quotes or '}'r )z{"r8 r )z{"spamr8 r )z{"spam"zExpecting ':' delimiterr9 )z{"spam":r3 r: )z {"spam":42r5 � )z{"spam":42,z1Expecting property name enclosed in double quotes� )�"r8 r )z"spamr8 r )z[,r3 r )z--r3 r )z"dzInvalid control character %rr zUnexpected success parsing '�'r z doesn't start with z for zpos z != r&