Ë
    ž…j-G  ã                   óÐ  — d dl Z d dlZd dlZd dlZd dlZd dlZd dlm	Z
 d dlmZ d dlmZmZmZ ej"                  j%                  d¬«      Zej(                  d„ «       Zej(                  d„ «       Zej(                  d„ «       Zej(                  d	„ «       Zej(                  d
„ «       Zej(                  d„ «       Zej(                  d„ «       Z G d„ dej8                  «      Zd„ Zd„ Zd„ Z y)é    N)Úbase)Ú	JSONArrayÚ	JSONDtypeÚ	make_dataÚ
Unhashable©Úreasonc                  ó   — t        «       S ©N)r   © ó    úf/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/pandas/tests/extension/json/test_json.pyÚdtyper      s
   € ä‹;Ðr   c                  óº   — t        d«      } t        | d   «      t        | d   «      k(  r)t        d«      } t        | d   «      t        | d   «      k(  rŒ)t        | «      S )z'Length-10 JSONArray for semantics test.é
   r   é   )r   Úlenr   )Údatas    r   r   r      sV   € ô �R‹=€Dô ˆd�1‰g‹,œ#˜d 1™g›,Ò
&Ü˜‹}ˆô ˆd�1‰g‹,œ#˜d 1™g›,Ó
&ô �T‹?Ðr   c                  ó    — t        i ddig«      S )zLength 2 array with [NA, Valid]Úar   ©r   r   r   r   Údata_missingr   ,   s   € ô �b˜3 ˜)�_Ó%Ð%r   c                  ó,   — t        ddiddidddœg«      S )NÚbr   Úcé   é   é   ©r   r   r   r   r   r   Údata_for_sortingr    2   s!   € ä�s˜A�h  a °¸Ñ*:Ð;Ó<Ð<r   c                  ó&   — t        ddii ddig«      S )Nr   r   r   r   r   r   r   r   Údata_missing_for_sortingr"   7   s   € ä�s˜A�h  S¨! HÐ-Ó.Ð.r   c                  ó"   — t         j                  S r   )ÚoperatorÚeqr   r   r   Úna_cmpr&   <   s   € ä�;‰;Ðr   c                  óD   — t        ddiddii i dddœdddœddiddig«      S )Nr   r   r   r   r   r   r   r   r   r   Údata_for_groupingr(   A   sF   € äà�!ˆHØ�!ˆHØØØ˜!ÑØ˜!ÑØ�!ˆHØ�!ˆHð		
óð r   c                   óÂ  ‡ — e Zd Zej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Z	ej                  j                  d	¬«      ˆ fd
„«       Z
ej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Zˆ fd„Zej                  j                  d¬«      ˆ fd„«       Zej                  j                  d¬«      ˆ fd„«       Zej                  j%                  ddg d¢g d¢fdg d¢g d¢fdg d¢g d¢fdg d¢g d¢fdg d¢g d¢fdg d¢g d¢fdg d¢g d¢fdg d¢g d¢fg«      ˆ fd „«       Zˆ fd!„Zeˆ fd"„«       Zej                  j                  d#¬«      ˆ fd$„«       Zej                  j                  d%d&e¬'«      ˆ fd(„«       Zej                  j                  d)¬«      ˆ fd*„«       Zej                  j                  d+¬«      ˆ fd,„«       Zej                  j                  d+¬«      ˆ fd-„«       Zej                  j;                  d.«      ˆ fd/„«       Zej                  j                  d0¬«      ˆ fd1„«       Zej                  j                  d2¬«      ˆ fd3„«       Z eˆ fd4„«       Z!eˆ fd5„«       Z"eˆ fd6„«       Z#eˆ fd7„«       Z$ˆ fd8„Z%ˆ fd9„Z&ej                  j                  d:¬«      ˆ fd;„«       Z'ej                  j                  d:¬«      ˆ fd<„«       Z(ej                  j                  d:¬«      ˆ fd=„«       Z)ej                  j                  d:¬«      ˆ fd>„«       Z*ej                  j%                  d? e+jX                  g d@¢«       e-jX                  g d@¢dA¬B«       e-jX                  dCdCdCe-j\                  e-j\                  gdA¬B«      gg dD¢¬E«      ˆ fdF„«       Z/ˆ fdG„Z0ej                  j                  dH¬«      ˆ fdI„«       Z1ej                  j%                  dJg dK¢ e-jX                  g dK¢dL¬B«       e+jX                  g dK¢«      gg dM¢¬E«      ˆ fdN„«       Z2ej                  j%                  dJdOdPdQe-j\                  g e-jX                  dOdPdQe-j\                  gdL¬B«      gdRdSg¬E«      ej                  j%                  dTdC ejf                  d&ej                  j                  dU¬«      ¬V«      g«      ˆ fdW„«       «       Z4ej                  j                  dX¬«      ˆ fdY„«       Z5ˆ fdZ„Z6ej                  j                  d[¬«      ˆ fd\„«       Z7ej                  j                  dH¬«      ej                  j%                  d]d^d_g«      ˆ fd`„«       «       Z8ej                  j                  da¬«      ˆ fdb„«       Z9ej                  j                  dc¬«      ˆ fdd„«       Z:ej                  j                  dc¬«      ˆ fde„«       Z;ej                  j                  dc¬«      ˆ fdf„«       Z<ej                  j                  dg¬«      ˆ fdh„«       Z=ej                  j                  di¬«      ˆ fdj„«       Z>ej                  j                  dk¬«      ˆ fdl„«       Z?ej                  j                  dm¬«      ej                  j%                  dndodpg«      ˆ fdq„«       «       Z@ˆ xZAS )rÚTestJSONArrayz:comparison method not implemented for JSONArray (GH-37867)r   c                 ó$   •— t         ‰| �  |«       y r   )ÚsuperÚtest_contains©Úselfr   Ú	__class__s     €r   r-   zTestJSONArray.test_containsR   s   ø€ ô
 	‰Ñ˜dÕ#r   z&not implemented constructor from dtypec                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_from_dtyper.   s     €r   r2   zTestJSONArray.test_from_dtypeY   s   ø€ ô 	‰Ñ Õ%r   zRecursionError, GH-33900c                 óØ   •— t        j                  «       }	 t        j                  d«       t        ‰| �  ||«       t        j                  |«       y # t        j                  |«       w xY w©Néd   )ÚsysÚgetrecursionlimitÚsetrecursionlimitr,   Ú*test_series_constructor_no_data_with_index©r/   r   Úna_valueÚ	rec_limitr0   s       €r   r9   z8TestJSONArray.test_series_constructor_no_data_with_index^   sR   ø€ ô ×)Ñ)Ó+ˆ	ð	-ä×!Ñ! #Ô&Ü‰GÑ>¸uÀhÔOä×!Ñ! )Õ,øŒC×!Ñ! )Õ,úó   —%A ÁA)c                 óØ   •— t        j                  «       }	 t        j                  d«       t        ‰| �  ||«       t        j                  |«       y # t        j                  |«       w xY wr4   )r6   r7   r8   r,   Ú,test_series_constructor_scalar_na_with_indexr:   s       €r   r?   z:TestJSONArray.test_series_constructor_scalar_na_with_indexi   sR   ø€ ô ×)Ñ)Ó+ˆ	ð	-ä×!Ñ! #Ô&Ü‰GÑ@ÀÈÔQä×!Ñ! )Õ,øŒC×!Ñ! )Õ,úr=   zcollection as scalar, GH-33901c                 óØ   •— t        j                  «       }	 t        j                  d«       t        ‰| �  ||«       t        j                  |«       y # t        j                  |«       w xY wr4   )r6   r7   r8   r,   Ú)test_series_constructor_scalar_with_index)r/   r   r   r<   r0   s       €r   rA   z7TestJSONArray.test_series_constructor_scalar_with_indext   sR   ø€ ô ×)Ñ)Ó+ˆ	ð	-ä×!Ñ! #Ô&Ü‰GÑ=¸dÀEÔJä×!Ñ! )Õ,øŒC×!Ñ! )Õ,úr=   zDifferent definitions of NAc                 ó"   •— t         ‰| �  «        y)zÛ
        The test does .astype(object).stack(). If we happen to have
        any missing values in `data`, then we'll end up with different
        rows since we consider `{}` NA, but `.astype(object)` doesn't.
        N)r,   Ú
test_stack©r/   r0   s    €r   rC   zTestJSONArray.test_stack   s   ø€ ô 	‰ÑÕr   zdict for NAc                 ó$   •— t         ‰| �  ||«      S r   )r,   Útest_unstack)r/   r   Úindexr0   s      €r   rF   zTestJSONArray.test_unstackˆ   s   ø€ ô ‰wÑ# D¨%Ó0Ð0r   zSetting a dict as a scalarc                 ó"   •— t         ‰| �  «        y©z;We treat dictionaries as a mapping in fillna, not a scalar.N)r,   Útest_fillna_seriesrD   s    €r   rJ   z TestJSONArray.test_fillna_seriesŽ   s   ø€ ô 	‰Ñ"Õ$r   c                 ó"   •— t         ‰| �  «        yrI   )r,   Útest_fillna_framerD   s    €r   rL   zTestJSONArray.test_fillna_frame“   s   ø€ ô 	‰Ñ!Õ#r   c                 ó€   •— t        j                  t        «      5  t        ‰| �  |«       d d d «       y # 1 sw Y   y xY wr   )ÚpytestÚraisesÚAssertionErrorr,   Útest_fillna_with_none©r/   r   r0   s     €r   rQ   z#TestJSONArray.test_fillna_with_none˜   s3   ø€ ô �]‰]œ>Ó*ñ 	8Ü‰GÑ)¨,Ô7÷	8÷ 	8ñ 	8ús   ›4´=z5fill value is a dictionary, takes incorrect code pathc                 ó$   •— t         ‰| �  |«       y r   ©r,   Útest_fillna_limit_framerR   s     €r   rU   z%TestJSONArray.test_fillna_limit_frameŸ   ó   ø€ ô 	‰Ñ'¨Õ5r   c                 ó$   •— t         ‰| �  |«       y r   rT   rR   s     €r   Útest_fillna_limit_seriesz&TestJSONArray.test_fillna_limit_series¤   rV   r   z'limit_area, input_ilocs, expected_ilocsÚoutside)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   )r   r   r   r   r   Úinside)r   r   r   r   r   c                 óŽ   •— d}t        j                  t        |¬«      5  t        ‰| �  ||||«       d d d «       y # 1 sw Y   y xY w)Nz'JSONArray does not implement limit_area©Úmatch)rN   rO   ÚNotImplementedErrorr,   Útest_ffill_limit_area)r/   r   Ú
limit_areaÚinput_ilocsÚexpected_ilocsÚmsgr0   s         €r   r_   z#TestJSONArray.test_ffill_limit_area©   sD   ø€ ð" 8ˆÜ�]‰]Ô.°cÔ:ñ 	Ü‰GÑ)Ø˜j¨+°~ô÷	÷ 	ñ 	ús	   Ÿ;»Ac                 óp   •— t        |«      dk(  s|r|j                  t        «       t        ‰| �  ||«       y )Nr   )r   ÚapplymarkerÚ
unhashabler,   Útest_value_counts)r/   Úall_dataÚdropnaÚrequestr0   s       €r   rg   zTestJSONArray.test_value_countsÀ   s.   ø€ Üˆx‹=˜BÒ¡&Ø×Ñ¤
Ô+Ü‰Ñ! (¨FÕ3r   c                 ó"   •— t         ‰| �  «        y r   )r,   Útest_sort_values_framerD   s    €r   rl   z$TestJSONArray.test_sort_values_frameÅ   s   ø€ ô 	‰Ñ&Õ(r   z#combine for JSONArray not supportedc                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_combine_le)r/   Údata_repeatedr0   s     €r   rn   zTestJSONArray.test_combine_leÊ   s   ø€ ä‰Ñ Õ.r   zGcombine for JSONArray not supported - may pass depending on random dataF)r	   ÚstrictrO   c                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_combine_firstr.   s     €r   rr   z TestJSONArray.test_combine_firstÎ   s   ø€ ô 	‰Ñ" 4Õ(r   zbroadcasting errorc                 ó&   •— t         ‰| �  ||«       y r   )r,   Útest_where_series)r/   r   r;   r0   s      €r   rt   zTestJSONArray.test_where_series×   s   ø€ ô
 	‰Ñ! $¨Õ1r   zCan't compare dicts.c                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_searchsorted)r/   r    r0   s     €r   rv   zTestJSONArray.test_searchsortedÞ   s   ø€ ä‰Ñ!Ð"2Õ3r   c                 ó(   •— t         ‰| �  |||«       y r   )r,   Útest_equals)r/   r   r;   Ú	as_seriesr0   s       €r   rx   zTestJSONArray.test_equalsâ   s   ø€ ä‰Ñ˜D (¨IÕ6r   z-fill-value is interpreted as a dict of valuesc                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_fillna_copy_framerR   s     €r   r{   z$TestJSONArray.test_fillna_copy_frameæ   s   ø€ ä‰Ñ& |Õ4r   zFails with CoWc                 ó$   •— t         ‰| �  |«       y r   )r,   Ú&test_equals_same_data_different_objectr.   s     €r   r}   z4TestJSONArray.test_equals_same_data_different_objectê   ó   ø€ ä‰Ñ6°tÕ<r   z$failing on np.array(self, dtype=str)c                 ó"   •— t         ‰| �  «        y)zŠThis currently fails in NumPy on np.array(self, dtype=str) with

        *** ValueError: setting an array element with a sequence
        N)r,   Útest_astype_strrD   s    €r   r€   zTestJSONArray.test_astype_strî   s   ø€ ô 	‰ÑÕ!r   c                 ó"   •— t         ‰| �  «        y)a  
        This currently fails in Series.name.setter, since the
        name must be hashable, but the value is a dictionary.
        I think this is what we want, i.e. `.name` should be the original
        values, and not the values for factorization.
        N)r,   Ú test_groupby_extension_transformrD   s    €r   r‚   z.TestJSONArray.test_groupby_extension_transformö   s   ø€ ô 	‰Ñ0Õ2r   c                 ó"   •— t         ‰| �  «        y)zó
        This fails in Index._do_unique_check with

        >   hash(val)
        E   TypeError: unhashable type: 'UserDict' with

        I suspect that once we support Index[ExtensionArray],
        we'll be able to dispatch unique.
        N)r,   Útest_groupby_extension_applyrD   s    €r   r„   z*TestJSONArray.test_groupby_extension_apply   s   ø€ ô 	‰Ñ,Õ.r   c                 ó"   •— t         ‰| �  «        y©z‰
        This fails when we get to tm.assert_series_equal when left.index
        contains dictionaries, which are not hashable.
        N)r,   Útest_groupby_extension_aggrD   s    €r   r‡   z(TestJSONArray.test_groupby_extension_agg  s   ø€ ô 	‰Ñ*Õ,r   c                 ó"   •— t         ‰| �  «        yr†   )r,   Útest_groupby_extension_no_sortrD   s    €r   r‰   z,TestJSONArray.test_groupby_extension_no_sort  s   ø€ ô 	‰Ñ.Õ0r   c                 óª   •— t        |d   «      dk7  r1t        j                  j                  d¬«      }|j	                  |«       t
        ‰| �  ||«       y )Nr   r   zraises in coercing to Seriesr   )r   rN   ÚmarkÚxfailre   r,   Útest_arith_frame_with_scalar)r/   r   Úall_arithmetic_operatorsrj   r‹   r0   s        €r   r�   z*TestJSONArray.test_arith_frame_with_scalar  sI   ø€ Üˆt�A‰w‹<˜1ÒÜ—;‘;×$Ñ$Ð,JÐ$ÓKˆDØ×Ñ Ô%Ü‰Ñ,¨TÐ3KÕLr   c                 ó¤   •— |j                   dv r1t        j                  j                  d¬«      }|j	                  |«       t
        ‰| �  ||«       y )N)r%   Únez"Comparison methods not implementedr   )Ú__name__rN   r‹   rŒ   re   r,   Útest_compare_array)r/   r   Úcomparison_oprj   r‹   r0   s        €r   r’   z TestJSONArray.test_compare_array#  sF   ø€ Ø×!Ñ! \Ñ1Ü—;‘;×$Ñ$Ð,PÐ$ÓQˆDØ×Ñ Ô%Ü‰Ñ" 4¨Õ7r   z.ValueError: Must have equal len keys and valuec                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_setitem_loc_scalar_mixedr.   s     €r   r•   z+TestJSONArray.test_setitem_loc_scalar_mixed)  s   ø€ ä‰Ñ-¨dÕ3r   c                 ó$   •— t         ‰| �  |«       y r   )r,   Ú,test_setitem_loc_scalar_multiple_homogoneousr.   s     €r   r—   z:TestJSONArray.test_setitem_loc_scalar_multiple_homogoneous-  s   ø€ ä‰Ñ<¸TÕBr   c                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_setitem_iloc_scalar_mixedr.   s     €r   r™   z,TestJSONArray.test_setitem_iloc_scalar_mixed1  s   ø€ ä‰Ñ.¨tÕ4r   c                 ó$   •— t         ‰| �  |«       y r   )r,   Ú-test_setitem_iloc_scalar_multiple_homogoneousr.   s     €r   r›   z;TestJSONArray.test_setitem_iloc_scalar_multiple_homogoneous5  s   ø€ ä‰Ñ=¸dÕCr   Úmask)TTTFFÚboolean)r   T)únumpy-arrayzboolean-arrayzboolean-array-na)Úidsc                 ó&  •— |r2t         j                  j                  d¬«      }|j                  |«       nKt	        |t
        j                  «      s1t         j                  j                  d¬«      }|j                  |«       t        ‰| �!  |||«       y )Nú<cannot set using a list-like indexer with a different lengthr   z"Issues unwanted DeprecationWarning)	rN   r‹   rŒ   re   Ú
isinstanceÚnpÚndarrayr,   Útest_setitem_mask)r/   r   rœ   Úbox_in_seriesrj   r‹   r0   s         €r   r¥   zTestJSONArray.test_setitem_mask9  sy   ø€ ñ Ü—;‘;×$Ñ$ØUð %ó ˆDð ×Ñ Õ%Ü˜D¤"§*¡*Ô-Ü—;‘;×$Ñ$Ð,PÐ$ÓQˆDØ×Ñ Ô%Ü‰Ñ! $¨¨mÕ<r   c                 óŒ   •— |s1t         j                  j                  d¬«      }|j                  |«       t        ‰| �  ||«       y )NúFails to raiser   )rN   r‹   rŒ   re   r,   Útest_setitem_mask_raises)r/   r   r¦   rj   r‹   r0   s        €r   r©   z&TestJSONArray.test_setitem_mask_raisesM  s;   ø€ ÙÜ—;‘;×$Ñ$Ð,<Ð$Ó=ˆDØ×Ñ Ô%ä‰Ñ(¨¨}Õ=r   r¡   c                 ó&   •— t         ‰| �  ||«       y r   )r,   Ú'test_setitem_mask_boolean_array_with_na©r/   r   r¦   r0   s      €r   r«   z5TestJSONArray.test_setitem_mask_boolean_array_with_naT  s   ø€ ô 	‰Ñ7¸¸mÕLr   Úidx)r   r   r   ÚInt64)Úlistúinteger-arrayrž   c                 óŽ   •— |r1t         j                  j                  d¬«      }|j                  |«       t        ‰| �  |||«       y )Nr¡   r   )rN   r‹   rŒ   re   r,   Útest_setitem_integer_array)r/   r   r­   r¦   rj   r‹   r0   s         €r   r²   z(TestJSONArray.test_setitem_integer_arrayZ  sE   ø€ ñ Ü—;‘;×$Ñ$ØUð %ó ˆDð ×Ñ Ô%Ü‰Ñ*¨4°°mÕDr   r   r   r   r¯   r°   r¦   z3list indices must be integers or slices, not NAType)Úmarksc                 ó(   •— t         ‰| �  |||«       y r   )r,   Ú(test_setitem_integer_with_missing_raises)r/   r   r­   r¦   r0   s       €r   rµ   z6TestJSONArray.test_setitem_integer_with_missing_raisesg  s   ø€ ô* 	‰Ñ8¸¸sÀMÕRr   r¨   c                 ó$   •— t         ‰| �  |«       y r   )r,   Ú&test_setitem_scalar_key_sequence_raiser.   s     €r   r·   z4TestJSONArray.test_setitem_scalar_key_sequence_raise~  r~   r   c                 ó¸   •— d|j                   j                  v r1t        j                  j	                  d¬«      }|j                  |«       t        ‰| �  ||«       y )NÚ
full_sliceúslice is not iterabler   )ÚnodeÚnamerN   r‹   rŒ   re   r,   Ú,test_setitem_with_expansion_dataframe_column)r/   r   Úfull_indexerrj   r‹   r0   s        €r   r½   z:TestJSONArray.test_setitem_with_expansion_dataframe_column‚  sJ   ø€ Ø˜7Ÿ<™<×,Ñ,Ñ,Ü—;‘;×$Ñ$Ð,CÐ$ÓDˆDØ×Ñ Ô%Ü‰Ñ<¸TÀ<ÕPr   rº   c                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_setitem_frame_2d_valuesr.   s     €r   rÀ   z*TestJSONArray.test_setitem_frame_2d_valuesˆ  s   ø€ ä‰Ñ,¨TÕ2r   ÚsetterÚlocNc                 ó&   •— t         ‰| �  ||«       y r   )r,   Útest_setitem_mask_broadcast)r/   r   rÁ   r0   s      €r   rÄ   z)TestJSONArray.test_setitem_mask_broadcastŒ  s   ø€ ô
 	‰Ñ+¨D°&Õ9r   z8cannot set using a slice indexer with a different lengthc                 ó&   •— t         ‰| �  ||«       y r   )r,   Útest_setitem_slicer¬   s      €r   rÆ   z TestJSONArray.test_setitem_slice“  s   ø€ ô 	‰Ñ" 4¨Õ7r   zslice object is not iterablec                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_setitem_loc_iloc_slicer.   s     €r   rÈ   z)TestJSONArray.test_setitem_loc_iloc_slice™  s   ø€ ä‰Ñ+¨DÕ1r   c                 ó$   •— t         ‰| �  |«       y r   )r,   Ú)test_setitem_slice_mismatch_length_raisesr.   s     €r   rÊ   z7TestJSONArray.test_setitem_slice_mismatch_length_raises�  s   ø€ ä‰Ñ9¸$Õ?r   c                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_setitem_slice_arrayr.   s     €r   rÌ   z&TestJSONArray.test_setitem_slice_array¡  s   ø€ ä‰Ñ(¨Õ.r   zFail to raisec                 ó&   •— t         ‰| �  ||«       y r   )r,   Útest_setitem_invalid)r/   r   Úinvalid_scalarr0   s      €r   rÎ   z"TestJSONArray.test_setitem_invalid¥  s   ø€ ä‰Ñ$ T¨>Õ:r   z?result readonly flag is incorrect and does not support na_valuec                 ó$   •— t         ‰| �  |«       y r   )r,   Ú.test_readonly_propagates_to_numpy_array_methodr.   s     €r   rÑ   z<TestJSONArray.test_readonly_propagates_to_numpy_array_method©  s   ø€ ô 	‰Ñ>¸tÕDr   z+only integer scalar arrays can be convertedc                 ó$   •— t         ‰| �  |«       y r   )r,   Útest_setitem_2d_valuesr.   s     €r   rÓ   z$TestJSONArray.test_setitem_2d_values¯  s   ø€ ä‰Ñ& tÕ,r   zdata type 'json' not understoodÚenginer   Úpythonc                 ó(   •— t         ‰| �  |||«       y r   )r,   Útest_EA_types)r/   rÔ   r   rj   r0   s       €r   r×   zTestJSONArray.test_EA_types³  s   ø€ ô 	‰Ñ˜f d¨GÕ4r   )Br‘   Ú
__module__Ú__qualname__rN   r‹   rŒ   r-   r2   r9   r?   rA   rC   rF   rJ   rL   rQ   rU   rX   Úparametrizer_   rg   rf   rl   rn   rP   rr   rt   rv   rx   Úskipr{   r}   r€   r‚   r„   r‡   r‰   r�   r’   r•   r—   r™   r›   r£   ÚarrayÚpdÚNAr¥   r©   r«   r²   Úparamrµ   r·   r½   rÀ   rÄ   rÆ   rÈ   rÊ   rÌ   rÎ   rÑ   rÓ   r×   Ú__classcell__)r0   s   @r   r*   r*   Q   sF  ø„ Ø‡[�[×ÑØKð ó ó$óð$ð ‡[�[×ÑÐFÐÓGó&ó Hð&ð ‡[�[×ÑÐ8ÐÓ9ó-ó :ð-ð ‡[�[×ÑÐ8ÐÓ9ó-ó :ð-ð ‡[�[×ÑÐ>ÐÓ?ó-ó @ð-ð ‡[�[×ÑÐ;ÐÓ<óó =ðð ‡[�[×Ñ˜mÐÓ,ó1ó -ð1ð
 ‡[�[×ÑÐ:ÐÓ;ó%ó <ð%ð ‡[�[×ÑÐ:ÐÓ;ó$ó <ð$ô8ð ‡[�[×ÑÐUÐÓVó6ó Wð6ð ‡[�[×ÑÐUÐÓVó6ó Wð6ð ‡[�[×ÑØ1àšªÐ9ØšªÐ9ØšªÐ9ØšªÐ9Ø’ªÐ8Ø’ªÐ8Ø’ªÐ8Ø’ªÐ8ð		
óóóðô4ð
 ó)ó ð)ð ‡[�[×ÑÐCÐÓDó/ó Eð/ð ‡[�[×Ñð,àØð	 ó ó)óð)ð ‡[�[×ÑÐ2ÐÓ3ó2ó 4ð2ð ‡[�[×ÑÐ4ÐÓ5ó4ó 6ð4ð ‡[�[×ÑÐ4ÐÓ5ó7ó 6ð7ð ‡[�[×ÑÐEÓFó5ó Gð5ð ‡[�[×ÑÐ.ÐÓ/ó=ó 0ð=ð ‡[�[×ÑÐDÐÓEó"ó Fð"ð ó3ó ð3ð ó
/ó ð
/ð ó-ó ð-ð ó1ó ð1ôMô8ð ‡[�[×ÑÐNÐÓOó4ó Pð4ð ‡[�[×ÑÐNÐÓOóCó PðCð ‡[�[×ÑÐNÐÓOó5ó Pð5ð ‡[�[×ÑÐNÐÓOóDó PðDð ‡[�[×ÑØàˆB�H‰HÒ5Ó6ØˆB�H‰HÒ5¸YÔGØˆB�H‰H�d˜D $¨¯©¨r¯u©uÐ5¸YÔGð	
ò
 Að ó ó	=óð	=ô>ð ‡[�[×ÑØMð ó óMóðMð ‡[�[×ÑØÚ	�H�B—H‘HšY¨gÔ6¸¸¿¹ÂÓ8KÐLÚ4ð ó ó
Eóð
Eð ‡[�[×ÑØà��1�b—e‘eÐØˆB�H‰H�a˜˜A˜rŸu™uÐ%¨WÔ5ð	
ð �_Ð%ð ó ð ‡[�[×ÑØàØˆF�L‰LØØ—k‘k×'Ñ'ØPð (ó ôð	
óóSóóð(Sð ‡[�[×ÑÐ.ÐÓ/ó=ó 0ð=ôQð ‡[�[×ÑÐ5ÐÓ6ó3ó 7ð3ð ‡[�[×ÑØMð ó ð ‡[�[×Ñ˜X¨¨t }Ó5ó:ó 6óð:ð ‡[�[×ÑØIð ó ó8óð8ð ‡[�[×ÑÐ<ÐÓ=ó2ó >ð2ð ‡[�[×ÑÐ<ÐÓ=ó@ó >ð@ð ‡[�[×ÑÐ<ÐÓ=ó/ó >ð/ð ‡[�[×Ñ˜oÐÓ.ó;ó /ð;ð ‡[�[×ÑØPð ó óEóðEð ‡[�[×ÑÐKÐÓLó-ó Mð-ð ‡[�[×ÑÐ?ÐÓ@Ø‡[�[×Ñ˜X¨¨X Ó7ó5ó 8ó Aô5r   r*   c                 óè  — | j                   j                  dk(  r¿| j                   |j                   k(  sJ ‚t        j                  t	        | j
                  j                  t        «      «      | j                  | j                  ¬«      } t        j                  t	        |j
                  j                  t        «      «      |j                  |j                  ¬«      }t        j                  | |g|¢­i |¤Ž y )NÚjson)rG   r¼   )r   r¼   rÝ   ÚSeriesr   ÚvaluesÚastypeÚobjectrG   ÚtmÚassert_series_equal)ÚleftÚrightÚargsÚkwargss       r   Úcustom_assert_series_equalrí   ¹  s¬   € ð
 ‡z�z‡�˜&Ò Ø�z‰z˜UŸ[™[Ò(Ð(Ð(Ü�y‰yÜ�d—k‘k×(Ñ(¬Ó0Ó1¸¿¹È$Ï)É)ô
ˆô —	‘	Ü�e—l‘l×)Ñ)¬&Ó1Ó2Ø—+‘+Ø—‘ô
ˆô
 ×Ñ˜4 Ð8¨Ò8°Ó8r   c                 óö  — |j                  dd«      }t        j                  | j                  |j                  |j                  dd«      |j                  dd«      |j                  dd«      |j                  d	d«      |› d
�¬«       | j                  dk(  j
                  }|D ]  }t        | |   ||   g|¢­i |¤Ž Œ | j                  |¬«      } |j                  |¬«      }t        j                  | |g|¢­i |¤Ž y )NÚobjÚ	DataFrameÚcheck_column_typeÚequivÚcheck_namesTÚcheck_exactFÚcheck_categoricalz.columns)Úexactró   rô   rõ   rï   râ   )Úcolumns)	Úgetrç   Úassert_index_equalr÷   ÚdtypesrG   rí   ÚdropÚassert_frame_equal)ré   rê   rë   rì   Úobj_typeÚjsonsÚcols          r   Úcustom_assert_frame_equalr   Ë  sñ   € Ø�z‰z˜% Ó-€HÜ×ÑØ�‰Ø�‰Ø�j‰jÐ,¨gÓ6Ø—J‘J˜}¨dÓ3Ø—J‘J˜}¨eÓ4Ø Ÿ*™*Ð%8¸$Ó?Øˆj˜Ð!õð �[‰[˜FÑ"×)Ñ)€Eàò KˆÜ" 4¨¡9¨e°C©jÐJ¸4ÒJÀ6ÓJðKð �9‰9˜Uˆ9Ó#€DØ�J‰J˜uˆJÓ%€EÜ×Ñ˜$ Ð7¨Ò7°Ó7r   c                  ó¨  — t        t        j                  ddi«      t        j                  ddi«      t        j                  ddi«      g«      } t        j                  | «      }t        ||«       t        |j                  «       |j                  «       «       t        j                  | j                  g d¢«      «      }d}t        j                  t        |¬	«      5  t        ||«       d d d «       t        j                  t        |¬	«      5  t        |j                  «       |j                  «       «       d d d «       y # 1 sw Y   ŒVxY w# 1 sw Y   y xY w)
Nr   r   r   r   r   r   )r   r   r   zSeries are differentr\   )r   ÚcollectionsÚUserDictrÝ   rã   rí   r   Úto_frameÚtakerN   rO   rP   )r   r   r   rc   s       r   Útest_custom_assertsr  á  s  € ô ä× Ñ  # q Ó*Ü× Ñ  # q Ó*Ü× Ñ  # q Ó*ð	
ó€Dô 	�	‰	�$‹€AÜ˜q !Ô$Ü˜aŸj™j›l¨A¯J©J«LÔ9ä
�	‰	�$—)‘)šIÓ&Ó'€AØ
!€CÜ	�‰”~¨SÔ	1ñ )Ü" 1 aÔ(÷)ô 
�‰”~¨SÔ	1ñ >Ü! !§*¡*£,°·
±
³Ô=÷>ð >÷)ð )ú÷>ð >ús   ÃD<Ä
)EÄ<EÅE)!r  r$   r6   Únumpyr£   rN   ÚpandasrÝ   Úpandas._testingÚ_testingrç   Úpandas.tests.extensionr   Ú!pandas.tests.extension.json.arrayr   r   r   r‹   rŒ   rf   Úfixturer   r   r   r    r"   r&   r(   ÚExtensionTestsr*   rí   r   r  r   r   r   ú<module>r     s  ðÛ Û Û 
ã Û ã Ý Ý '÷ñ ð �[‰[×Ñ lÐÓ3€
ð ‡�ñó ðð ‡�ñó ðð  ‡�ñ&ó ð&ð
 ‡�ñ=ó ð=ð ‡�ñ/ó ð/ð ‡�ñó ðð ‡�ñó ðôe5�D×'Ñ'ô e5òP9ò$8ó,>r   