
    <i!                     N    S SK r S SKrS SKJr  S SKrS SKJrJr   " S S\5      r	g)    N)TestCase)	text_typebc                   2    \ rS rSrS rS rS rS rS rSr	g)	
TestErrors   c                     SSSSS./n [         R                  " U5        U R                  S5        U R                  [        W5      S5        g ! [         a    [        R
                  " 5       S   n N@f = f)	NA)      g      @zD tuple)ar   c)dExpected TypeError   z5keys must be str, int, float, bool or None, not tuplejsondumpsfail	TypeErrorsysexc_infoassertEqualstr)selfdataerrs      V/home/james-whalen/.local/lib/python3.13/site-packages/simplejson/tests/test_errors.pytest_string_keys_error!TestErrors.test_string_keys_error   sl    S)DE	,JJt II*+SG	I	  	$,,.#C	$s   A "A21A2c                      [         R                  " [         5        U R                  S5        U R                  [        W5      S5        g ! [         a    [        R
                  " 5       S   n N@f = f)Nr   r   z.Object of type module is not JSON serializabler   r   r   s     r   test_not_serializable TestErrors.test_not_serializable   s[    	,JJt II*+S@	B	  	$,,.#C	$s   A	 	"A.-A.c                    S n [         R                  " S5        U R                  S5        U R                  UR                  S5        U R                  UR                  S5        U R                  UR                  S5        U R                  UR                  S5        g ! [         R                   a    [        R
                  " 5       S   n Nf = f)N{}
a
bExpected JSONDecodeErrorr   r      )r   loadsr   JSONDecodeErrorr   r   r   linenocolno	endlinenoendcolnor"   s     r   test_decode_errorTestErrors.test_decode_error   s    	2JJz" II01Q'A&*q) ## 	$,,.#C	$s   B ,C
Cc                 ^   S n[         [        4 Hi  n [        R                  " U" S5      5        U R	                  S5        U R                  UR                  S5        U R                  UR                  S5        Mk     g ! [        R
                   a    [        R                  " 5       S   n Nkf = f)Nz
{"asdf": "r'   r   
   )r   r   r   r)   r   r*   r   r   r   r+   r,   )r   r   ts      r   test_scan_errorTestErrors.test_scan_error*   s    QA6

1\?+ 		45SZZ+SYY+   '' (llnQ'(s   A==,B,+B,c                 D   S n [         R                  " S5        U R                  S5        [        R                  " U5      n[        R                  " U5      nU R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        U R                  UR                  UR                  5        g ! [         R                   a    [        R
                  " 5       S   n Nf = f)Nr&   r'   r   )r   r)   r   r*   r   r   pickler   r   msgdocposend)r   r   ses       r   test_error_is_pickable!TestErrors.test_error_is_pickable6   s    	2JJz" II01LLLLO!%%(!%%(!%%(!%%( ## 	$,,.#C	$s   C0 0,DD N)
__name__
__module____qualname____firstlineno__r   r#   r/   r4   r>   __static_attributes__r@       r   r   r      s    	IB*
,)rF   r   )
r   r7   unittestr   
simplejsonr   simplejson.compatr   r   r   r@   rF   r   <module>rJ      s       *=) =)rF   