ó
x\c           @` sp   d  d l  m Z m Z m Z m Z d  d l Z d  d l m Z m Z m	 Z	 m
 Z
 m Z d e f d     YZ d S(   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsN(   t   ExtTypet   Packert   Unpackert   packbt   unpackbt
   TestLimitsc           B` sP   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         C` s²   d } t  t |   | k s$ t  d } t j t t f d |  t | d  Wd  QXd
 } t  t |   | k s~ t  t j t t f d |  t | d  Wd  QXd  S(   Ni   i?   uL   ((long |Python )?(int )?too (big|large) to convert( to C (unsigned )?long))?t   matchi   i@   l            lū’’’         l            l   ’’’’ (   R   R   t   AssertionErrort   pytestt   raisest   OverflowErrort
   ValueError(   t   selft   xt   msg(    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_integer   s    c         C` sC   t    } | j d  t j t t f   | j d  Wd  QXd  S(   Ni   i    i   I       I’’’’    I       (   R   t   pack_array_headerR   R   R   R   (   R   t   packer(    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_array_header   s    	c         C` sC   t    } | j d  t j t t f   | j d  Wd  QXd  S(   Ni   i    i   I       I’’’’    I       (   R   t   pack_map_headerR   R   R   R   R   (   R   R   (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_map_header   s    	c         C` s   d	 } t  |  } t d d d d  } | j |  | j   | k sL t  t d d d d  } | j |  d } t j t d |  | j   Wd  QXd  S(
   Nu   xi   t   max_str_lent   encodingu   utf-8i   u   3 exceeds max_str_lenR
   u   xxx(   R   R   t   feedt   unpackR   R   R   R   (   R   t   dt   packedt   unpackerR   (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_max_str_len$   s    c         C` s   d } t  | d t } t d d  } | j |  | j   | k sL t  t d d  } | j |  d } t j t d |  | j   Wd  QXd  S(	   NR   i   t   use_bin_typet   max_bin_leni   u   3 exceeds max_bin_lenR
   t   xxx(	   R   t   TrueR   R   R   R   R   R   R   (   R   R   R   R   R   (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_max_bin_len3   s    c         C` s   d d d g } t  |  } t d d  } | j |  | j   | k sO t  t d d  } | j |  d } t j t d |  | j   Wd  QXd  S(   Ni   i   i   t   max_array_lenu   3 exceeds max_array_lenR
   (   R   R   R   R   R   R   R   R   (   R   R   R   R   R   (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_max_array_lenB   s    c         C` s§   i d d 6d d 6d d 6} t  |  } t d d  } | j |  | j   | k s[ t  t d d  } | j |  d } t j t d	 |  | j   Wd  QXd  S(
   Ni   i   i   i   i   i   t   max_map_lenu   3 exceeds max_map_lenR
   (   R   R   R   R   R   R   R   R   (   R   R   R   R   R   (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_max_map_lenQ   s    c         C` s   t  d d  } t |  } t d d  } | j |  | j   | k sO t  t d d  } | j |  d } t j t d |  | j   Wd  QXd  S(   Ni*   t   abct   max_ext_leni   i   u   4 exceeds max_ext_lenR
   (	   R   R   R   R   R   R   R   R   R   (   R   R   R   R   R   (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   test_max_ext_len`   s    (
   t   __name__t
   __module__R   R   R   R    R%   R'   R)   R,   (    (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyR	   
   s   							(   t
   __future__R    R   R   R   R   t   pandas.io.msgpackR   R   R   R   R   t   objectR	   (    (    (    sB   lib/python2.7/site-packages/pandas/tests/io/msgpack/test_limits.pyt   <module>   s   "(