
j\c           @@  s
  d  Z  d d l m Z 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	 Z	 d d l
 m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l Z d d	 l m Z d d
 l m Z m Z m Z m Z m Z m Z m Z m Z m Z m  Z  m! Z! d Z" d Z# e" e j$ e# d e d Z% e& e j e% d   d Z' d e' Z( d Z) i e j* e+ f d 6e j, e& f d 6e j- e& f d 6e j. e& f d 6e j/ e& f d 6e j0 e& f d 6e j1 e& f d 6e j2 e& f d 6e j3 e& f d 6e j4 e5 f d 6e j6 e5 f d 6e j7 e8 f d 6e j9 e8 f d  6e j0 e& f d! 6e j6 e5 f d" 6e j- e& f d# 6d$ e' e j: f d% 6Z; i e d& 6e d' 6e d( 6e d) 6e d* 6e d+ 6e d, 6e d- 6e d. 6e  d/ 6e! d0 6Z< e= e d1  r
e j> e5 f e; d1 <n  e? d2   e j@ e;  D  ZA e? d3   e j@ e;  D  ZB eC d d d d d g  ZD e	 jE e? d4   e e%  D   ZF d d5  ZG d d6  ZH d d7  ZI eI d8 d9  ZJ eI d: d; d< e# ZK i  ZL d=   ZM d> e jN f d?     YZO d@ e jP e f dA     YZQ dB d dC     YZR dD d dE     YZS d dF dG dH dI dJ dK dL d d g
 ZU eC dF dH dK dL d g  ZV e" dM ZW e" dN dM ZX dO ZY dP dQ dR dS g ZZ dT eQ f dU     YZ[ d dV  Z\ dP d dW  Z] d a^ x@ e; D]8 Z_ x/ eU D]' Z` x eZ D] Za e] e_ e` ea  qWqWqWxI d d g D]; Z_ x2 e< D]* Zb x! eU D] Z` e] e_ e` dX eb qJWq=Wq0WdY Zc dZ Zd d[ d d\     YZe d] d d^     YZf d_ d` g Zg eC d` g  Zh da g Zi db   Zj dc d dd     YZk de d df     YZl dg d dh     YZm di d dj     YZn dk d dl     YZo dm d dn     YZp do d dp     YZq dq dr ds dt g Zr d_ ds d` g Zs eC ds d` g  Zt d d dN du dv g Zu eC d d du dv g  Zv dw   Zw xe ej ew g D]W Zx xN ex   D]C \ Zy Zz Z{ e| dx   ez D  Z} e~ ey e} e{  Z dy ey d UqWqWdz eQ f d{     YZ d a d| eR e f d}     YZ d~ eS e f d     YZ d eR e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d   Z e d k r
e j e j  e j   e j d d  n  d S(   s$   Test module for queries on datasets.i    (   t   absolute_importN(   t   SizeType(   t   common(   t   unittest(   t   verbosePrint(   t   PyTablesTestCase(   t   range(   t   log10t   expt   logt   abst   sqrtt   sint   cost   tant   arcsint   arccost   arctani2   i   t   dtypei   s   %%0%ddi,  i<   i   i   t   boolt   int8t   uint8t   int16t   uint16t   int32t   uint32t   int64t   uint64t   float32t   float64t	   complex64t
   complex128t   time32t   time64t   enums   S%st   stringR   R	   R   R
   R   R   R   R   R   R   R   t   float16c         c@  s%   |  ] \ } } | | d  f Vq d S(   i    N(    (   t   .0t   type_t   info(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pys	   <genexpr>b   s   c         c@  s%   |  ] \ } } | | d  f Vq d S(   i   N(    (   R%   R&   R'   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pys	   <genexpr>e   s   c         c@  s   |  ] } d  | | f Vq d S(   s   n%dN(    (   R%   t   i(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pys	   <genexpr>l   s    c      	   C@  s   t  j } x t t t j t    D] \ } } | rJ | t k rJ q% n  | d } d | } | d k r t j	 j
 t |  } t j t t d  | d | d | } n7 t | }	 t j |	 | f  }
 t j j |
 d | } | |  | <q% W| } | S(   s   Append a ``Col`` of each PyTables data type to the `classdict`.

    A column of a certain TYPE gets called ``c_TYPE``.  The number of
    added columns is returned.

    i   s   c_%sR"   i    t   shapet   pos(   R   t   heavyt	   enumeratet   sortedt   sixt   iterkeyst	   type_infot   heavy_typest   tablest   Atomt   from_sctypet   sctype_from_typet   EnumColR"   t   numpyR   t   Colt
   from_dtype(   t	   classdictR)   R+   t   itypeR&   t   colpost   colnamet   baset   colt   sctypeR   t   ncols(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   append_columnsr   s    	(

*
c         C@  s6   i  } t  | d | | | d <t |  t j f |  S(   s   Return a nested column description with all PyTables data types.

    A column of a certain TYPE gets called ``c_TYPE``.  The nested
    column will be placed in the position indicated by `pos`.

    R)   t   _v_pos(   RB   t   typeR2   t   IsDescription(   t	   classnameR*   R)   R:   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   nested_description   s    
c         C@  s   i  } t  | |  } t | | d | } | | d <| d 7} t j d | d |  } | | d <| d 7} t j d | d |  } | | d <| d 7} t |  t j f |  S(   s  Return a table description for testing queries.

    The description consists of all PyTables data types, both in the
    top level and in the ``c_nested`` nested column.  A column of a
    certain TYPE gets called ``c_TYPE``.  An extra integer column
    ``c_extra`` is also provided.  If a `shape` is given, it will be
    used for all columns.  Finally, an extra indexed column
    ``c_idxextra`` is added as well in order to provide some basic
    tests for multi-index queries.

    R)   t   c_nestedi   R*   t   c_extrat
   c_idxextra(   RB   RG   R2   t   IntColRD   RE   (   RF   t
   nclassnameR)   R:   R<   t   ndescrt   extracolt   idxextracol(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   table_description   s    





t   TableDescriptiont   NestedDescriptiont   MDTableDescriptiont   MDNestedDescriptionR)   c         C@  s  t  j | | f  } | d k	 r< |  j |  |  j   d St j } t t j	 | d t
  } |  j d } } xjt |  D]\} t j | | |  j |  }	 xt j t  D] \ }
 } | r |
 t k r q n  d |
 } d | } |
 d k r
|	 t d k } nl |
 d k rag  t | | |  D] } t | ^ q*} t j | d | j |  } n t j |	 d | } | | | <| | <|	 t d | d	 <|	 t d | d
 <q W| j   | d 7} | t k r} d } q} q} W|  j   |  j   } | t  | | f <d S(   s[  Fill the given `table` with `nrows` rows of data.

    Values in the i-th row (where 0 <= i < `row_period`) for a
    multidimensional field with M elements span from i to i + M-1.  For
    subsequent rows, values repeat cyclically.

    The same goes for the ``c_extra`` column, but values range from
    -`row_period`/2 to +`row_period`/2.

    NR   i    s   c_%ss   c_nested/%sR   i   R#   RI   RJ   i   (   t
   table_datat   gett   Nonet   appendt   flushR   R+   t   intR7   t   prodR   t   rowR   t   aranget   reshapeR.   t	   iteritemsR5   R1   t
   row_periodt
   str_formatt   arrayt   asarrayt   read(   t   tableR)   t   nrowst   tdataR+   t   sizeR\   t   valuet   nrowt   dataR&   R@   R=   t   ncolnamet   coldatat   xt   sdata(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt
   fill_table   s>    
	

*!


t   SilentlySkipTestc           B@  s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRq      s   t   BaseTableQueryTestCasec           B@  sJ   e  Z d  Z e Z d Z e j d  Z e j d  Z	 d   Z
 d   Z RS(   s4  Base test case for querying tables.

    Sub-classes must define the following attributes:

    ``tableDescription``
        The description of the table to be created.
    ``shape``
        The shape of data fields in the table.
    ``nrows``
        The number of data rows to be generated for the table.

    Sub-classes may redefine the following attributes:

    ``indexed``
        Whether columns shall be indexed, if possible.  Default is not
        to index them.
    ``optlevel``
        The level of optimisation of column indexes.  Default is 0.

    i    s   \bcan not be indexed\bs    \bdoes not have a boolean type\bc      
   C@  s   |  j  s d  Sys |  j } t d | | f  xO | | | g D]> } |  j j | } | j d |  j d |  j d t d t  q= WWnY t	 k
 r } |  j
 j t |   r t d   n    n t k
 r t d   n Xd  S(   Ns$   * Indexing ``%s`` columns. Type: %s.t   kindt   optlevelt   _blocksizest	   _testmodes(   Columns of this type can not be indexed.s3   Indexing columns of this type is not supported yet.(   t   indexedRu   t   vprintRe   t   colinstancest   create_indexRv   t   small_blocksizest   Truet	   TypeErrort   colNotIndexable_ret   searcht   strRq   t   NotImplementedError(   t   selfR=   Rl   t   extracolnameRu   t   acolnamet   acolumnt   te(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   create_indexes  s$    			c         C@  sW   t  t |   j   |  j j d d |  j d |  j |  _ t |  j |  j	 |  j  d  S(   Nt   /t   testt   expectedrows(
   t   superRt   t   setUpt   h5filet   create_tablet   tableDescriptionRf   Re   Rp   R)   (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR   .  s    	(   Rr   Rs   t   __doc__t   FalseRy   Rv   t   ret   compileR   t   condNotBoolean_reR   R   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRt      s   	t   ScalarTableMixinc           B@  s   e  Z e Z d  Z RS(   (    (   Rr   Rs   RQ   R   R)   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR   5  s   t   MDTableMixinc           B@  s   e  Z e Z e Z RS(    (   Rr   Rs   RS   R   t   md_shapeR)   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR   :  s   t   ~t   <s   <=s   ==s   !=s   >=t   >i   i   g?t    s   & ((c_extra + 1) < 0)s   | (c_idxextra > 0)s*   | ((c_idxextra > 0) | ((c_extra + 1) > 0))t   TableDataTestCasec           B@  s   e  Z d  Z d Z d Z RS(   s  Base test case for querying table data.

    Automatically created test method names have the format
    ``test_XNNNN``, where ``NNNN`` is the zero-padded test number and
    ``X`` indicates whether the test belongs to the light (``l``) or
    heavy (``h``) set.

    s
   test_l%04ds
   test_h%04d(   Rr   Rs   R   t   _testfmt_lightt   _testfmt_heavy(    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR   W  s   c         @  s  t  |   i t d 6t d 6t d 6t d 6 xP t j   D]? \ } } |  d k ra t | } n  t |  |  } |  | <q< Wd |    d    | s    n | d k r d	    n | d
 k r | d  k r d   | t	  d  f  nb t
 | t  r#d | d     | d f  n2 | d  k	 rEd |   | f  n d   | f  | rnd  | f  n  d   } |       f d    } d  | _ | S(   Nt   boundt   lboundt   rboundt
   func_boundR#   s   c_%ss   c_nested/%sR   s   ~(%s)R   s   %s %s %ss   (lbound %s %s) & (%s %s rbound)i    i   s   %s(%s) %s func_bounds   %s %s bounds   (%s) %sc         @  s"   t  j      f d    } | S(   Nc         @  s}   |  j    z^ y   |  | |  SWnC t k
 rf } | j rL | j d } n d } t j d |  n XWd  t j d  Xd  S(   Ni    s	   <skipped>s   
Skipped test: %sR   (   t   _verboseHeaderRq   t   argsR   R   (   R   R   t   kwargst   set   msg(   t	   oldmethod(    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt	   newmethod  s    
 	(   t	   functoolst   wraps(   R   R   (    (   R   s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   ignore_skipped  s    c      
   @  s:  t  d    } x/ d" d# d$ g D] \ } } | j | |  } q$ Wt | d d	  } |  j } |  j    d
  t d d d | j d d d  } d% \ } } x   g D]} g  g   j   }	 }
 } x | j	 |   D] } | | |   <| d | d <| d
 | d
 <y< t
 j   * t
 j d d t  t | t |  } Wd  QXWn t k
 rjt d   n X| r |	 j | j  |
 j | |  q q Wt j |	  }	 t j |
 d  }
 |
 j   t  d t |	  | f  | d  k r|	 } |
 } n8 |  j t j |	 | k   |  j t j |
 | k    j   } | j | |   <| j d | d <| j d
 | d
 <y~ | j  |  } g  t d  D]! } | j   d t | ^ q} g  t d  D]! } | j   d | | ^ q} WnY t k
 r0} |  j  j! t" |   r*t d   n    n t# k
 rLt d   n Xx | D] } | j   qTWt  d t | d  | f d t t  d d  d! g t$ |   |  j t j | d | k   |  j t j | d | k   |  j t j | d | d k   |  j t j | d | d k   q Wd  S(&   Ns   * Condition is ``%s``.t   &t   andt   |t   orR   t   nots   <string>t   evalRJ   t   starti   t   stopi   t   stepi   RI   t   ignores)   invalid value encountered in arc(cos|sin)s/   The Python type does not support the operation.R   s)   * %d rows selected by Python from ``%s``.i   t   sortt   fields   The condition is not boolean.s1   The PyTables type does not support the operation.s*   * %d rows selected by PyTables from ``%s``i    t   nonls   (indexing: %s).t   not   yes(   R   R   (   R   R   (   R   R   (   NN(%   Rz   t   replaceR   Re   R   t   dictRf   RW   t   copyt   iterrowst   warningst   catch_warningst   filterwarningst   RuntimeWarningR   t	   func_infoR   Rq   RX   Rj   R7   Rb   R   t   lent
   assertTruet   allR{   t   will_query_use_indexingR   t   get_where_listR~   t
   read_whereR   R   R   R   R   (   R   t   pycondt   ptopt   pyopRe   t   table_slicet   rownost   fvaluesR   t   pyrownost	   pyfvaluest   pyvarsR\   t
   isvalidrowt   ptvarst   isidxqt   _t   ptrownost	   ptfvaluesR   t   ptfvals(   R=   t   condt   condvarsRl   R@   (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_method  s    	"
	15  $s   Testing ``%s``.(   R5   t   right_boundt
   left_boundR   R.   R_   Ra   t   nxtype_from_typeRW   t   reprt
   isinstancet   tupleR   (   R&   t   opt	   extracondt   funct   bnamet   bvalueR   R   (    (   R=   R   R   Rl   R@   s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   create_test_methodd  s<    




	 	!Rc   	      C@  s   |  t  k p | t k } | r0 t j } d } n t j } d } t |  | | |  } | t | _ | j | t 7_ t	 j
 d d k  r t j | d  t  } n | } t t | j |  t d 7a d  S(   Ns    [#H%d]s    [#L%d]i    i   i   (   R1   t   heavy_operatorsR   R   R   R   t   testnRr   R   t   syst   version_infot   typest
   MethodTypeRW   t   setattr(	   R&   R   R   R   R+   t   testfmtt   numfmtt   tmethodt   imethod(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   add_test_method  s    			R   i   i   t   SmallNITableMixinc           B@  sJ   e  Z e d  Z e e k  o' e k  n s2 t  e e d k sH t  RS(   i   i    (   Rr   Rs   R`   Rf   t   NX_BLOCK_SIZE2t   NX_BLOCK_SIZE1t   AssertionError(    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR     s   
"t   BigNITableMixinc           B@  sT   e  Z e d  Z e e e k s& t  e e d k s< t  e e d k sR t  RS(   i   i    (   Rr   Rs   R`   Rf   R   R   R   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR     s   
t   Smallt   Bigt   Scalarc          c@  s~   xw t  D]o }  |  t k } xZ t D]R } d |  d | d f } d |  d | d f } t d |  } | | | f Vq  Wq Wd  S(   Ns   %s%sTDTestCasei    s   %sNITableMixins   %sTableMixinR   R+   (   t   table_sizest   heavy_table_sizest   table_ndimsR   (   Rh   R+   t   ndimRF   t
   cbasenamesR:   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   niclassdata/  s    	t   UltraLightITableMixinc           B@  s   e  Z d  Z RS(   t
   ultralight(   Rr   Rs   Ru   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR  ;  s   t   LightITableMixinc           B@  s   e  Z d  Z RS(   t   light(   Rr   Rs   Ru   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR  ?  s   t   MediumITableMixinc           B@  s   e  Z d  Z RS(   t   medium(   Rr   Rs   Ru   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR
  C  s   t   FullITableMixinc           B@  s   e  Z d  Z RS(   t   full(   Rr   Rs   Ru   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR  G  s   t   SmallSTableMixinc           B@  s   e  Z d  Z RS(   i2   (   Rr   Rs   Rf   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR  M  s   t   MediumSTableMixinc           B@  s   e  Z d  Z RS(   id   (   Rr   Rs   Rf   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR  Q  s   t   BigSTableMixinc           B@  s   e  Z d  Z RS(   i  (   Rr   Rs   Rf   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR  U  s   t
   UltraLightt   Lightt   Mediumt   Fulli   i	   c       
   c@  s   x t  D] }  x t D] } x t D]| } | t k p< | t k } d | d |  d | f } d | d |  d d f } t d | d | d	 t  } | | | f Vq! Wq Wq Wd  S(
   Ns   %sI%sO%dTDTestCasei    s   %sSTableMixins   %sITableMixinR   R   R+   Rv   Ry   (   t   ckindst   itable_sizest   itable_optvaluest   heavy_itable_optvaluest   heavy_itable_sizesR   R~   (   t   ckindRh   Rv   R+   RF   R  R:   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt
   iclassdatai  s    	c         c@  s   |  ] } t  |  Vq d  S(   N(   R   (   R%   t   cbase(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pys	   <genexpr>|  s    s   %s = class_t   BaseTableUsageTestCasec           B@  s   e  Z e Z RS(    (   Rr   Rs   R`   Rf   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR    s   t   ScalarTableUsageTestCasec           B@  sz   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z RS(   sl   Test case for query usage on scalar tables.

    This also tests for most usage errors and situations.

    c         C@  s   |  j  t |  j j d  d S(   s   Using an empty condition.R   N(   t   assertRaisest   SyntaxErrorRe   t   where(   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_empty_condition  s    c         C@  s   |  j  t |  j j d  d S(   s&   Using a condition with a syntax error.s   foo barN(   R  R   Re   R!  (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_syntax_error  s    c         C@  sY   |  j  t |  j j d  |  j  t |  j j d i i  d 6 |  j  t |  j j d  d S(   s-   Using a condition with an unsupported object.s   []t   objs   c_bool < []N(   R  R   Re   R!  (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_unsupported_object  s    #c         C@  sO   |  j  t |  j j d  |  j  t |  j j d  |  j  t |  j j d  d S(   s*   Using a condition with unsupported syntax.s	   c_bool[0]s   c_bool()s   c_bool.__init__N(   R  R   Re   R!  t	   NameError(   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_unsupported_syntax  s    c         C@  s   |  j  t |  j j d  d S(   s0   Using a condition with no participating columns.R~   N(   R  t
   ValueErrorRe   R!  (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_no_column  s    c         C@  sX   |  j  j d d |  j  } |  j t |  j j d i |  j j j d 6| j j d 6 d S(   s1   Using a condition with a column from other table.R   t   others   c_int32_a + c_int32_b > 0t	   c_int32_at	   c_int32_bN(	   R   R   R   R  R(  Re   R!  t   colst   c_int32(   R   t   table2(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_foreign_column  s
    c         C@  sk   t  } |  j | |  j j d  t j d d k  rN |  j | |  j j d  n |  j | |  j j d  d S(   s7   Using a condition with unsupported operations on types.s   c_complex128 > 0ji    i   s   c_string + "a" > "abc"s   c_string + b"a" > b"abc"N(   R   R  Re   R!  R   R   (   R   t   NIE(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_unsupported_op  s    c         C@  s   |  j  t |  j j d  d S(   s   Using a non-boolean condition.R.  N(   R  R   Re   R!  (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_not_boolean  s    c         C@  s   |  j  t |  j j d  d S(   s&   Using a condition with nested columns.RH   N(   R  R   Re   R!  (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_nested_col  s    c         @  sh     j  t   j j d    j  t   j j d i   j j j d 6   f d   }   j  t |  d S(   s*   Using implicit column names in conditions.R.  t   c_boolc          @  s6     j  j j }    j |  d  k	    j  j d  d  S(   NR.  (   Re   R-  R5  R   RW   R!  (   R.  (   R   (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   where_with_locals  s    N(   R  R   Re   R!  R-  R.  (   R   R6  (    (   R   s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_implicit_col  s
    c         @  se     j  t   j j d i d d 6   f d   }   j  t |    f d   }   j  t |  d S(   s(   Using condition variables in conditions.s   c_string > boundi    R   c          @  s:   d }    j  t |  t     j j d i d d 6 d  S(   Nt   foos   c_string > boundi    R   (   R   R   R   Re   R!  (   R   (   R   (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR6    s    c           @  sE   d a    j t t  t   z   j j d i d d 6 Wd  b  Xd  S(   NR8  s   c_string > _gvari    t   _gvar(   R9  R   R   R   Re   R!  (    (   R   (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   where_with_globals  s
    N(   R  R   Re   R!  (   R   R6  R:  (    (   R   s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_condition_vars  s    	c         @  s     j  t   j j d    j  t   j j d i   j j j d 6   f d   }   j  t |    f d   }   j  t |  d S(   s*   Looking up different scopes for variables.R?   c          @  s6     j  j j }    j |  d  k	    j  j d  d  S(   NR?   (   Re   R-  R.  R   RW   R!  (   R?   (   R   (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   where_whith_locals   s    c           @  sA     j  j j a   j t d  k	  z   j  j d  Wd  b Xd  S(   NR9  (   Re   R-  R.  R9  R   RW   R!  (    (   R   (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR:    s
    N(   R  R&  Re   R!  R   R-  R.  (   R   R<  R:  (    (   R   s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   test_scopes  s    
(   Rr   Rs   R   R"  R#  R%  R'  R)  R0  R2  R3  R4  R7  R;  R=  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR    s   												t   MDTableUsageTestCasec           B@  s   e  Z d  Z d   Z RS(   s5   Test case for query usage on multidimensional tables.c         C@  s   |  j  t |  j j d  d S(   s.   Using a condition on a multidimensional table.R5  N(   R  R   Re   R!  (   R   (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR     s    (   Rr   Rs   R   R   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR>    s   t   IndexedTableUsagec           B@  s,   e  Z d  Z d Z e Z d   Z d   Z RS(   s   Test case for query usage on indexed tables.

    Indexing could be used in more cases, but it is expected to kick in
    at least in the cases tested here.

    i2   c         C@  s   t  t |   j   |  j j j j d t  |  j j j j d t  |  j j	 |  _	 |  j j
 |  _ |  j j |  _ t   } x7 |  j D], } | d } | | k r | j |  q q Wt |  |  _ d  S(   NRw   i    (   R   R?  R   Re   R-  R5  R|   R}   R.  R   t   _compile_conditiont   compileConditiont   _required_expr_varst   requiredExprVarst   sett   idx_exprt   addt	   frozensett   usable_idxs(   R   RH  t   exprt   idxvar(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR   (  s    	
c         C@  s   x |  j  D] } |  j | i   } |  j | |  j d | | |  j f  |  j | d   } |  j | |  } | j } |  j | |  j d | | |  j f  | j	 } |  j | |  j
 d | | |  j
 f  t d | | j f  q
 Wd  S(   NsW   
Query with condition: ``%s``
Computed usable indexes are: ``%s``
and should be: ``%s``sg   
Wrong index expression in condition:
``%s``
Compiled index expression is:
``%s``
and should be:
``%s``sh   
Wrong index operations in condition:
``%s``
Computed index operations are:
``%s``
and should be:
``%s``sE   * Query with condition ``%s`` will use variables ``%s`` for indexing.(   t
   conditionsR   t   assertEqualRH  RC  RW   RA  t   index_expressionsRE  t   string_expressiont   str_exprRz   t   index_variables(   R   t	   conditiont   c_usable_idxsR   t   compiledt
   c_idx_exprt
   c_str_expr(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR   6  s"    		(   Rr   Rs   R   Rf   R~   Ry   R   R   (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR?    s
   	t   IndexedTableUsage1c           B@  s2   e  Z d  d d d g Z d d d	 f g Z d Z RS(
   s   (c_int32 > 0)s   (c_int32 > 0) & (c_extra > 0)s+   (c_int32 > 0) & ((~c_bool) | (c_extra > 0))s/   (c_int32 > 0) & ((c_extra < 3) & (c_extra > 0))R.  t   gti    t   e0(   RW  (   i    (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRV  Q  s   	t   IndexedTableUsage2c           B@  s2   e  Z d  d d d g Z d d
 d f g Z d	 Z RS(   s   (c_int32 > 0) & (c_int32 < 5)s-   (c_int32 > 0) & (c_int32 < 5) & (c_extra > 0)sB   (c_int32 > 0) & (c_int32 < 5) & ((c_bool == True) | (c_extra > 0))sB   (c_int32 > 0) & (c_int32 < 5) & ((c_extra > 0) | (c_bool == True))R.  RW  t   lti    i   RX  (   RW  RZ  (   i    i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRY  \  s   	t   IndexedTableUsage3c           B@  s8   e  Z d  d d d d g Z d d e f f g Z d Z RS(	   s   (c_bool == True)s    (c_bool == True) & (c_extra > 0)s    (c_extra > 0) & (c_bool == True)s2   ((c_extra > 0) & (c_extra < 4)) & (c_bool == True)s2   (c_bool == True) & ((c_extra > 0) & (c_extra < 4))R5  t   eqRX  (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR[  g  s   	t   IndexedTableUsage4c           B@  s?   e  Z d  d d g Z d d	 d
 f d d e f f g Z d Z RS(   s2   ((c_int32 > 0) & (c_bool == True)) & (c_extra > 0)s3   ((c_int32 > 0) & (c_bool == True)) & ((c_extra > 0)s    & (c_extra < 4))R.  RW  i    R5  R\  s	   (e0 & e1)(   RW  (   i    (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR]  s  s   
t   IndexedTableUsage5c           B@  s?   e  Z d  d  d g Z d d
 d f d d e f f g Z d	 Z RS(   s1   (c_int32 >= 1) & (c_int32 < 2) & (c_bool == True)s    & (c_extra > 0)R.  t   geRZ  i   i   R5  R\  s	   (e0 & e1)(   R_  RZ  (   i   i   (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR^    s   
t   IndexedTableUsage6c           B@  sH   e  Z d  d  d g Z d d d f d d d f d d d f g Z d
 Z RS(   s>   (c_int32 >= 1) & (c_int32 < 2) & (c_int32 > 0) & (c_int32 < 5)s    & (c_extra > 0)R.  R_  RZ  i   i   RW  i    i   s   ((e0 & e1) & e2)(   R_  RZ  (   i   i   (   RW  (   i    (   RZ  (   i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR`    s   
t   IndexedTableUsage7c           B@  s?   e  Z d  d d d g Z d d d f d d d f g Z d Z RS(   s@   (c_int32 >= 1) & (c_int32 < 2) & ((c_int32 > 0) & (c_int32 < 5))sB   ((c_int32 >= 1) & (c_int32 < 2)) & ((c_int32 > 0) & (c_int32 < 5))s    & (c_extra > 0)R.  R_  RZ  i   i   RW  i    i   s	   (e0 & e1)(   R_  RZ  (   i   i   (   RW  RZ  (   i    i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRa    s   
t   IndexedTableUsage8c           B@  s)   e  Z d  g Z d d d f g Z d Z RS(	   s/   (c_extra > 0) & ((c_int32 > 0) & (c_int32 < 5))R.  RW  RZ  i    i   RX  (   RW  RZ  (   i    i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRb    s   	t   IndexedTableUsage9c           B@  s;   e  Z d  d d g Z d d	 d
 f d d d f g Z d Z RS(   s-   (c_extra > 0) & (c_int32 > 0) & (c_int32 < 5)s/   ((c_extra > 0) & (c_int32 > 0)) & (c_int32 < 5)s=   (c_extra > 0) & (c_int32 > 0) & (c_int32 < 5) & (c_extra > 3)R.  RW  i    RZ  i   s	   (e0 & e1)(   RW  (   i    (   RZ  (   i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRc    s   	t   IndexedTableUsage10c           B@  sA   e  Z d  d d d g Z d d
 d f d d e f f g Z d	 Z RS(   s0   (c_int32 < 5) & (c_extra > 0) & (c_bool == True)s&   (c_int32 < 5) & (c_extra > 2) & c_bools@   (c_int32 < 5) & (c_bool == True) & (c_extra > 0) & (c_extra < 4)s@   (c_int32 < 5) & (c_extra > 0) & (c_bool == True) & (c_extra < 4)R.  RZ  i   R5  R\  s	   (e0 & e1)(   RZ  (   i   (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRd    s   	t   IndexedTableUsage11c           B@  s,   e  Z d  Z d d d d g Z g  Z d Z RS(   s1   Complex operations are not eligible for indexing.s   sin(c_int32) > 0s   (c_int32 * 2.4) > 0s   (c_int32 + c_int32) > 0s   c_int32**2 > 0R   (   Rr   Rs   R   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRe    s   	t   IndexedTableUsage12c           B@  s5   e  Z d  d d d g Z d d e f f g Z d Z RS(   s   ~c_bools	   ~(c_bool)s   ~c_bool & (c_extra > 0)s   ~(c_bool) & (c_extra > 0)R5  R\  RX  (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRf    s   	t   IndexedTableUsage13c           B@  s5   e  Z d  d d d g Z d d e f f g Z d Z RS(   s   ~(c_bool == True)s   ~((c_bool == True))s!   ~(c_bool == True) & (c_extra > 0)s#   ~((c_bool == True)) & (c_extra > 0)R5  R\  RX  (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRg    s   	t   IndexedTableUsage14c           B@  s2   e  Z d  d d d g Z d d d	 f g Z d Z RS(
   s   ~(c_int32 > 0)s    ~((c_int32 > 0)) & (c_extra > 0)s,   ~(c_int32 > 0) & ((~c_bool) | (c_extra > 0))s0   ~(c_int32 > 0) & ((c_extra < 3) & (c_extra > 0))R.  t   lei    RX  (   Ri  (   i    (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRh    s   	t   IndexedTableUsage15c           B@  sB   e  Z d  d d d g Z d d
 d f d d e f f g Z d	 Z RS(   s   (~(c_int32 > 0) | ~c_bool)s,   (~(c_int32 > 0) | ~(c_bool)) & (c_extra > 0)s5   (~(c_int32 > 0) | ~(c_bool == True)) & ((c_extra > 0)s    & (c_extra < 4))R.  Ri  i    R5  R\  s	   (e0 | e1)(   Ri  (   i    (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRj    s   
t   IndexedTableUsage16c           B@  s?   e  Z d  d d d g Z d d
 d f d d d f g Z d	 Z RS(   s!   (~(c_int32 > 0) & ~(c_int32 < 2))s1   (~(c_int32 > 0) & ~(c_int32 < 2)) & (c_extra > 0)s2   (~(c_int32 > 0) & ~(c_int32 < 2)) & ((c_extra > 0)s    & (c_extra < 4))R.  Ri  i    R_  i   s	   (e0 & e1)(   Ri  (   i    (   R_  (   i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRk     s   
t   IndexedTableUsage17c           B@  s?   e  Z d  d d d g Z d d
 d f d d d f g Z d	 Z RS(   s!   (~(c_int32 > 0) & ~(c_int32 < 2))s1   (~(c_int32 > 0) & ~(c_int32 < 2)) & (c_extra > 0)s2   (~(c_int32 > 0) & ~(c_int32 < 2)) & ((c_extra > 0)s    & (c_extra < 4))R.  Ri  i    R_  i   s	   (e0 & e1)(   Ri  (   i    (   R_  (   i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRl    s   
t   IndexedTableUsage18c           B@  s'   e  Z d  d d d g Z g  Z d Z RS(   s   ~((c_int32 > 0) & (c_bool))s+   ~((c_int32 > 0) & (c_bool)) & (c_extra > 0)s,   ~((c_int32 > 0) & (c_bool)) & ((c_extra > 0)s    & (c_extra < 4))R   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRm    s   
t   IndexedTableUsage19c           B@  s0   e  Z d  d g Z d d e f f g Z d Z RS(   s0   ~((c_int32 > 0) & (c_bool)) & ((c_bool == False)s    & (c_extra < 4))R5  R\  RX  (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRn  '  s   
t   IndexedTableUsage20c           B@  s>   e  Z d  d d g Z d d	 d
 f d d e f f g Z d Z RS(   s   ((c_int32 > 0) & ~(c_bool))s+   ((c_int32 > 0) & ~(c_bool)) & (c_extra > 0)sE   ((c_int32 > 0) & ~(c_bool == True)) & ((c_extra > 0) & (c_extra < 4))R.  RW  i    R5  R\  s	   (e0 & e1)(   RW  (   i    (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRo  1  s   	t   IndexedTableUsage21c           B@  sB   e  Z d  d d d g Z d d
 d f d d e f f g Z d	 Z RS(   s   (~(c_int32 > 0) & (c_bool))s+   (~(c_int32 > 0) & (c_bool)) & (c_extra > 0)s4   (~(c_int32 > 0) & (c_bool == True)) & ((c_extra > 0)s    & (c_extra < 4))R.  Ri  i    R5  R\  s	   (e0 & e1)(   Ri  (   i    (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRp  >  s   
t   IndexedTableUsage22c           B@  s6   e  Z d  d d d g Z d d e f f g Z d Z RS(   s5   ~((c_int32 >= 1) & (c_int32 < 2)) & ~(c_bool == True)s!   ~(c_bool == True) & (c_extra > 0)s6   ~((c_int32 >= 1) & (c_int32 < 2)) & (~(c_bool == True)s    & (c_extra > 0))R5  R\  RX  (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRq  K  s   
t   IndexedTableUsage23c           B@  s)   e  Z d  d d d d g Z g  Z d Z RS(   s   c_int32 != 1s   c_bool != Falses   ~(c_int32 != 1)s   ~(c_bool != False)s   (c_int32 != 1) & (c_extra != 2)R   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRr  W  s   	t   IndexedTableUsage24c           B@  s>   e  Z d  d d d d d d g Z d  d	 e f f g Z d Z RS(
   R5  s   c_bool == Trues   True == c_bools
   ~(~c_bool)s   ~~c_bools
   ~~~~c_bools   ~(~c_bool) & (c_extra != 2)R\  RX  (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRs  c  s   	t   IndexedTableUsage25c           B@  s>   e  Z d  d d d d d d g Z d d
 e f f g Z d	 Z RS(   s   ~c_bools   c_bool == Falses   False == c_bools	   ~(c_bool)s   ~((c_bool))s	   ~~~c_bools   ~~(~c_bool) & (c_extra != 2)R5  R\  RX  (   R\  (   Rr   Rs   RK  R   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRt  r  s   	t   IndexedTableUsage26c           B@  s&   e  Z d  d d d g Z g  Z d Z RS(   s   c_bool != Trues   True != c_bools   c_bool != Falses   False != c_boolR   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRu    s   	t   IndexedTableUsage27c           B@  sK   e  Z d  d d g Z d d	 d
 f d d e f f d d d f g Z d Z RS(   s(   (c_int32 == 3) | c_bool | (c_int32 == 5)s6   (((c_int32 == 3) | (c_bool == True)) | (c_int32 == 5))s    & (c_extra > 0)R.  R\  i   R5  i   s   ((e0 | e1) | e2)(   R\  (   i   (   R\  (   R\  (   i   (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRv    s   
t   IndexedTableUsage28c           B@  sK   e  Z d  d d g Z d d	 d
 f d d e f f d d d f g Z d Z RS(   s*   ((c_int32 == 3) | c_bool) & (c_int32 == 5)s6   (((c_int32 == 3) | (c_bool == True)) & (c_int32 == 5))s    & (c_extra > 0)R.  R\  i   R5  i   s   ((e0 | e1) & e2)(   R\  (   i   (   R\  (   R\  (   i   (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRw    s   
t   IndexedTableUsage29c           B@  sH   e  Z d  d d g Z d d	 d
 f d d d f d d d f g Z d Z RS(   s2   (c_int32 == 3) | ((c_int32 == 4) & (c_int32 == 5))s4   ((c_int32 == 3) | ((c_int32 == 4) & (c_int32 == 5)))s    & (c_extra > 0)R.  R\  i   i   i   s   ((e0 & e1) | e2)(   R\  (   i   (   R\  (   i   (   R\  (   i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRx    s   
t   IndexedTableUsage30c           B@  sH   e  Z d  d  d g Z d d d	 f d d
 d f d d d f g Z d Z RS(   s2   ((c_int32 == 3) | (c_int32 == 4)) & (c_int32 == 5)s    & (c_extra > 0)R.  R\  i   i   i   s   ((e0 | e1) & e2)(   R\  (   i   (   R\  (   i   (   R\  (   i   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRy    s   
t   IndexedTableUsage31c           B@  s2   e  Z d  d d g Z d d e f f g Z d Z RS(   s2   (c_extra > 0) & ((c_extra < 4) & (c_bool == True))s2   (c_extra > 0) & ((c_bool == True) & (c_extra < 5))s2   ((c_int32 > 0) | (c_extra > 0)) & (c_bool == True)R5  R\  RX  (   R\  (   Rr   Rs   RK  R~   RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyRz    s
   	t   IndexedTableUsage32c           B@  s   e  Z d  g Z g  Z d Z RS(   s@   (c_int32 < 5) & (c_extra > 0) & (c_bool == True) | (c_extra < 4)R   (   Rr   Rs   RK  RE  RO  (    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyR{    s   	c    
      C@  s  t  j   }  t g } | j t  t j } | r: d } n d } d } xjt |  D]\} xg | D]_ } xV |   D]K } t | d  } | s | j rp t  j	 | d | }	 |  j
 |	  qp qp Wq` W|  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t   |  j
 t  j	 t    |  j
 t  j	 t!   |  j
 t  j	 t"   |  j
 t  j	 t#   |  j
 t  j	 t$   |  j
 t  j	 t%   |  j
 t  j	 t&   |  j
 t  j	 t'   |  j
 t  j	 t(   |  j
 t  j	 t)   |  j
 t  j	 t*   |  j
 t  j	 t+   |  j
 t  j	 t,   qS W|  S(   sC   Return a test suite consisting of all the test cases in the module.R   t   test_li   i    t   prefix(-   R   t	   TestSuiteR  RX   R  R   R+   R   R   t	   makeSuitet   addTestR  R>  RV  RY  R[  R]  R^  R`  Ra  Rb  Rc  Rd  Re  Rf  Rg  Rh  Rj  Rk  Rl  Rm  Rn  Ro  Rp  Rq  Rr  Rs  Rt  Ru  Rv  Rw  Rx  Ry  Rz  R{  (
   t	   testSuitet
   cdatafuncsR+   t
   autoprefixt   niterR(   t	   cdatafunct   cdatat   class_t   suite_(    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   suite  sd    			t   __main__t   defaultTestR  (   i   i   (   i,  i<   i   i   (    (    (    (    (    (   R   s   <=(   R   s   >=(   R   s   >=(    (    (    (    (    (    (    (    (    (   R   t
   __future__R    R   R   R   R   R   R7   R2   t   tables.utilsR   t   tables.testsR   t   tables.tests.commonR   R   Rz   R   t   TestCaseR.   t	   six.movesR   R   R   R	   R
   R   R   R   R   R   R   R   R`   R   R[   t
   _maxnvalueRZ   t   _strlenRa   R}   t   bool_R   R   R   R   R   R   R   R   R   R   t   floatR   R   t   complexR   t   string_R0   R   t   hasattrR$   R   R_   R5   R   RG  R1   t   EnumR"   RB   RG   RP   RQ   RS   RU   Rp   t   SkipTestRq   t   TempFileMixinRt   R   R   RW   t	   operatorsR   R   R   R   t   extra_conditionsR   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  t   cnameR  t   cdictR   t   cbasesRD   R  R  R9  R  R>  R?  RV  RY  R[  R]  R^  R`  Ra  Rb  Rc  Rd  Re  Rf  Rg  Rh  Rj  Rk  Rl  Rm  Rn  Ro  Rp  Rq  Rr  Rs  Rt  Ru  Rv  Rw  Rx  Ry  Rz  R{  R  Rr   t
   parse_argvt   argvt   print_versionst   main(    (    (    s8   lib/python2.7/site-packages/tables/tests/test_queries.pyt   <module>   s8  L

		%	28
		
		
3	

	?
