Ñò
à"Ic           @   s2   d  d k  Z  d  d k Z d e f d „  ƒ  YZ d S(   iÿÿÿÿNt   MixinBytesBufferCommonTestsc           B   s¹   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 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sI   Tests that work for both bytes and buffer objects.
    See PEP 3137.
    c         C   s   t  d ƒ ‚ d S(   s4   Convert x into the appropriate type for these tests.s(   test class must provide a marshal methodN(   t   RuntimeError(   t   selft   x(    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   marshal   s    c         C   sç   |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(	   Nt    t   at   As   
t   abct   aBcs   abc
i*   (   t   assertFalseR   t   islowert   assert_t   assertRaisest	   TypeError(   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_islower   s    c         C   sç   |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d	 ƒ d  S(
   NR   R   R   s   
t   ABCt   AbCs   ABC
R   i*   (   R
   R   t   isupperR   R   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_isupper   s    c         C   sW  |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d	 ƒ i ƒ  ƒ |  i  |  i d
 ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(   NR   R   R   s   
s   A Titlecased Lines   A
Titlecased Lines   A Titlecased, Lines   Not a capitalized Strings   Not	a Titlecase Strings   Not--a Titlecase Stringt   NOTR   i*   (   R
   R   t   istitleR   R   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_istitle$   s    c         C   s  |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i t |  i d	 ƒ i d
 ƒ d  S(   NR   R   t    s   	s   s   
s    	
s    	
aR   i*   (   R
   R   t   isspaceR   R   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_isspace2   s    c         C   sç   |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(	   NR   R   R   s   
R   t   aBc123s   abc
i*   (   R
   R   t   isalphaR   R   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_isalpha=   s    c         C   s  |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i t |  i d	 ƒ i d
 ƒ d  S(   NR   R   R   s   
t	   123abc456t   a1b3cs   aBc000 s   abc
R   i*   (   R
   R   t   isalnumR   R   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_isalnumG   s    c         C   s¯   |  i  |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i |  i d ƒ i ƒ  ƒ |  i  |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(   NR   R   t   0t
   0123456789t   0123456789aR   i*   (   R
   R   t   isdigitR   R   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_isdigitR   s    c         C   sa   |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(   Nt   hellot   HeLLoi*   (   t   assertEqualR   t   lowerR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt
   test_lower[   s    c         C   sa   |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(   Nt   HELLOR'   R&   i*   (   R(   R   t   upperR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt
   test_upper`   s    c         C   s¾   |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(	   Ns    hello s   Hello s   hello t   Aaaat   aaaat   AaAaR&   i*   (   R(   R   t
   capitalizeR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_capitalizee   s    c         C   sÍ   |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d d	 ƒ ƒ |  i t |  i d ƒ i ƒ d  S(
   Ns
   abc       R   i
   s   abc   i   i   i   s
   abc*******t   *(   R(   R   t   ljustR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt
   test_ljustn   s    """"%c         C   sÍ   |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d d	 ƒ ƒ |  i t |  i d ƒ i ƒ d  S(
   Ns
          abcR   i
   s      abci   i   i   s
   *******abcR3   (   R(   R   t   rjustR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt
   test_rjustv   s    """"%c         C   sÍ   |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d d	 ƒ ƒ |  i t |  i d ƒ i ƒ d  S(
   Ns
      abc    R   i
   s    abc  i   i   i   s
   ***abc****R3   (   R(   R   t   centerR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_center~   s    """"%c         C   sB   |  i  d |  i d ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(   Ns   hEllO CoMPuTErSs   HeLLo cOmpUteRsR&   i*   (   R(   R   t   swapcaseR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_swapcase†   s    	c         C   s¸  |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d	 |  i d	 ƒ i d ƒ ƒ |  i  d	 |  i d	 ƒ i d ƒ ƒ |  i  d
 |  i d	 ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i t |  i d ƒ i ƒ d  S(   Nt   123i   i   t   0123i   s   +123s   +0123i   s   -123s   -0123t   000R   t   34i   t   0034(   R(   R   t   zfillR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt
   test_zfillŒ   s    """"""""""""c         C   s|  |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d |  i d ƒ i d ƒ ƒ |  i  d	 |  i d
 ƒ i d ƒ ƒ |  i t |  i d ƒ i d d ƒ t i d j  o< t i d ƒ d j o& |  i t	 |  i d ƒ i t i ƒ n d  S(   Ns   abcab      def
g       his   abcab	def
g	hii   s   abcab  def
g   hii   s   abc
ab  def
g   his   abc
ab	def
g	his   abc
ab
def
g
his     a
 bs    	a
	bi   R&   i*   i    t   Ps   	a
	bl        (
   R(   R   t
   expandtabsR   R   t   syst   maxintt   structt   calcsizet   OverflowError(   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_expandtabsœ   s&    							""&	c         C   sÝ   |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d |  i d ƒ i ƒ  ƒ |  i  d	 |  i d
 ƒ i ƒ  ƒ |  i t |  i d ƒ i d ƒ d  S(   Ns    Hello s    hello s   Hello s   hello s   Format This As Title Strings   fOrMaT thIs aS titLe Strings   Format,This-As*Title;Strings   fOrMaT,thIs-aS*titLe;Stringt   Getintt   getIntR&   i*   (   R(   R   t   titleR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt
   test_title³   s    		c         C   sV  |  i  d d d d g |  i d ƒ i ƒ  ƒ |  i  d d d d g |  i d ƒ i ƒ  ƒ |  i  d d d g |  i d ƒ i ƒ  ƒ |  i  d d d g |  i d ƒ i ƒ  ƒ |  i  d d d d g |  i d	 ƒ i ƒ  ƒ |  i  d d d d d g |  i d
 ƒ i ƒ  ƒ |  i  d d d d d g |  i d
 ƒ i d ƒ ƒ |  i t |  i d ƒ i d d ƒ d  S(   NR   t   defR   t   ghis   abc
def
ghis   abc
def

ghis   abc
def
ghis   abc
def
ghi
s   abc
def
ghi
s   
abc
def
ghi
s   
s   abc
s   def
s   ghi
s   i   i*   (   R(   R   t
   splitlinesR   R   (   R   (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   test_splitlines¾   s    (   t   __name__t
   __module__t   __doc__R   R   R   R   R   R   R    R%   R*   R-   R2   R5   R7   R9   R;   RB   RJ   RN   RR   (    (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyR       s(   		
	
			
														(   RG   RE   t   objectR    (    (    (    s.   /mit/python/lib/python2.6/test/buffer_tests.pyt   <module>   s   