
    Owgo
                         d dl Zd dlZd dlmZmZmZmZmZ d dl	m
Z
mZ ej                  j                  Zd Zd Zd Zd Zy)    N)	DataFrameHDFStoreIndexSeries
date_range)ensure_clean_storetablesc                    t        |       5 }t        t        j                  dt        j                        t        dd            |d<   t        t        d      dt        d      D cg c]  }d| 	 c}	      |d
<   t        dt        j                  d      j                  d      z  t        t        d      t              t        t        d      D cg c]  }d| 	 c}t                    |d<   t        |      dk(  sJ h d}t        |j                               |k(  sJ t        |      |k(  sJ 	 d d d        y c c}w c c}w # 1 sw Y   y xY w)N
   )dtypez
2020-01-01)periods)indexafloat64i_)r   r   bg?x   )      ABCDr   zi-)columnsr   c   >   /a/b/c)r   r   nparanger   r   ranger   reshaper   listobjectlensetkeys)
setup_pathstoreiexpecteds       Y/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/io/pytables/test_keys.py	test_keysr+      s%   	J	' &5IIb

+:lTV3W
c
 "IYr.KAA3x.K
c
 "))C.((11$v,f5595a2aS5VD
c
 5zQ%5::< H,,,5zX%%%!& &
 /L
 6& &s,   AE(E4A!EE!AE
EEc                     G d dt         j                        } G d dt         j                        } G d dt         j                        }| |z  }t        j                  |d      5 }|j                  d	d
      }|j	                  |d|d       |j	                  |d|d       |j	                  |d|d       d d d        t        |      5 }t        |j                  d            dk(  sJ h d}	t        |j                  d            |	k(  sJ t        |j                  d            t               k(  sJ |	D ]-  }
|j                  |
      }t        |j                        dk(  r-J  	 d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nc                   .    e Zd Z ej                         Zy)$test_non_pandas_keys.<locals>.Table1N)__name__
__module____qualname__r	   
Float32Colvalue1     r*   Table1r.   (       """$r5   r6   c                   .    e Zd Z ej                         Zy)$test_non_pandas_keys.<locals>.Table2N)r/   r0   r1   r	   r2   value2r4   r5   r*   Table2r9   +   r7   r5   r;   c                   .    e Zd Z ej                         Zy)$test_non_pandas_keys.<locals>.Table3N)r/   r0   r1   r	   r2   value3r4   r5   r*   Table3r=   .   r7   r5   r?   w)mode/grouptable1zTable 1table2zTable 2table3zTable 3nativeincluder   >   /group/table1/group/table2/group/table3pandas   )r	   IsDescription	open_filecreate_groupcreate_tabler   r#   r%   r$   getr   )tmp_pathr&   r6   r;   r?   pathh5filerC   r'   r)   namedfs               r*   test_non_pandas_keysrY   '   su   %%% %%%% %%%% % j D			$S	) @V##C1E8VY?E8VY?E8VY?	@
 
$ (55::h:/0A555F5::h:/0H<<<5::h:/0CE999 	(D4Brzz?a'''	(( (@ @
( (s    (AE3
BE?&E?3E<?Fc                     t        |       5 }t        j                  t        d      5  |j	                  d       d d d        d d d        y # 1 sw Y   xY w# 1 sw Y   y xY w)Nz@`include` should be either 'pandas' or 'native' but is 'illegal')matchillegalrH   )r   pytestraises
ValueErrorr%   )r&   r'   s     r*   'test_keys_illegal_include_keyword_valuer`   A   s]    	J	' *5]]T
 	* JJyJ)		** *	* 	** *s!   AAAA	AA!c                 d   t        |       5 }t        t        d      t        d      d      }|j                  d|       |j	                         dgk(  sJ |j
                  j                  |j
                  j                  dd       |j	                         dgk(  sJ 	 d d d        y # 1 sw Y   y xY w)N   )ABrX   z/dfsymlink)r   r   r   putr%   _handlecreate_soft_linkroot)r&   r'   rX   s      r*   test_keys_ignore_hdf_softlinkrj   J   s     
J	' 	'5U1XE!H56		$zz|w&&&&&u}}'9'99dK zz|w&&&	' 	' 	's   BB&&B/)numpyr   r]   rM   r   r   r   r   r   pandas.tests.io.pytables.commonr   r	   mark
single_cpu
pytestmarkr+   rY   r`   rj   r4   r5   r*   <module>rp      s?      
 [[##
&((4*'r5   