
    h                     B    d dl Zd dlmc mZ d dlmZmZ  G d d      Z	y)    N)	DataFrame
MultiIndexc                   *    e Zd Zd Zd Zd Zd Zd Zy)TestTableSchemaReprc                    |j                  |j                        }t        dddgi      }|d   |g}ddhh dg}t        j                  dd	      }d }t        ||      D ]N  \  }}	|}|5  |j                  j                  |      }
d d d        t        
d
   j                               |	k(  rNJ  t        j                  dd      }|5  |5  |j                  j                  |      }
d d d        d d d        h d}	t        
d
   j                               |	k(  sJ y # 1 sw Y   xY w# 1 sw Y   CxY w# 1 sw Y   GxY w)NconfigA      
text/plain!application/vnd.dataresource+json>   	text/htmlr   r   display.html.table_schemaTr   zstyler.render.reprlatex>   
text/latexr   r   r   )
instancer	   r   cfoption_contextzipdisplay_formatterformatsetkeys)selfipipythondfobjectsexpected_keysoptlast_objobjexpected	formatted
with_latexs               PD:\jyotish\venv\Lib\site-packages\pandas/tests/io/formats/test_ipython_compat.pytest_publishesz"TestTableSchemaRepr.test_publishes   s/   ++RYY+/aV}%c7B->?L

  ;TB -8MCH#55<<SA	 y|((*+x777	 9 &&';WE
*1188BI S
 9Q<$$&'8333  *SSs0   )DD5D)'D5D&	)D2	.D55D>c                    t        j                  ddgg dg      }t        t        j                  j                  d      j                  dt        |      f      |      }t        j                  dd      }|5  |j                  |j                  	      j                  j                  |      }d d d        d
dh}t        d   j                               |k(  sJ y # 1 sw Y   /xY w)Nr
   B)abcr      )columnsr   Tr   r   r   r   )r   from_productr   nprandomdefault_rngstandard_normallenr   r   r   r	   r   r   r   r   )r   r   midxr   r!   r%   r$   s          r'   test_publishes_not_implementedz2TestTableSchemaRepr.test_publishes_not_implemented*   s     &&c
O'DEII!!!$44aT^Dd
  ;TB2995GGNNrRI  !+.9Q<$$&'8333	 Ss   86CC%c                     t        dddgi      }t        j                  dd      5  |j                         }d d d        J y # 1 sw Y   xY w)Nr
   r   r   r   Tr   r   r   _repr_data_resource_r   r   results      r'   test_config_onz"TestTableSchemaRepr.test_config_on:   sQ    aV}%:DA,,.F B !!! BA   AAc                     t        dddgi      }t        j                  dd      5  |j                         }d d d        J y # 1 sw Y   xY w)Nr
   r   r   r   Fr9   r;   s      r'   test_config_default_offz+TestTableSchemaRepr.test_config_default_offA   sO    aV}%:EB,,.F C ~~ CBr>   c                    |j                  |j                        j                  j                  }d}t	        j
                  dd      5  d|v sJ ||   j                  sJ 	 d d d        d|v sJ ||   j                  rJ t	        j
                  dd      5  d|v sJ ||   j                  sJ |j                  |j                        j                  j                  t               d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nr   r   r   T)r   r	   r   
formattersr   r   enabledr   )r   r   rB   mimetypes       r'   #test_enable_data_resource_formatterz7TestTableSchemaRepr.test_enable_data_resource_formatterH   s    [[		[2DDOO
6:DA6*DDDh'//// B
 3j@@@h'//// :DA6*DDDh'////KKryyK);;BB2F	 BA BA BAs   	C1AC=1C:=DN)__name__
__module____qualname__r(   r7   r=   r@   rE        r'   r   r      s    4<4 "GrJ   r   )
numpyr1   pandas._config.config_configr	   r   pandasr   r   r   rI   rJ   r'   <module>rO      s!     " "OG OGrJ   