-í
é¶<c       sQ   d  k  l Z l Z l Z d k Z d k Z d k Z e i Z d „  Z e ƒ  d S(   (   s   verifys   vereqs   TESTFNNc   	  s
  t  i i t ƒ o t  i t ƒ n t t d ƒ } z#| i d t ƒ | i d ƒ | i d t d ƒ t	 i	 | i
 ƒ  d t ƒ } | i ƒ  t | ƒ GHd G| i d ƒ t t ƒ Gd GHt | i d ƒ t ƒ d Gt | ƒ t t ƒ Gd GHt t | ƒ d t ƒ d	 Gt | d
 ƒ GHt | d
 d ƒ d Gt | d
 d !ƒ GHt | d
 d !d ƒ d GHd | d
 <d | t d t d d +d	 Gt | d
 ƒ GHt | d
 d ƒ d Gt | d
 d !ƒ GHt | d
 d !d ƒ d Gt | t d t d !ƒ GHt | t d t d !d ƒ | i ƒ  t i d | ƒ }
 |
 t j o	 d GHnU |
 i d
 ƒ \ } } | | }	 d G| t t ƒ G|	 GHt | t ƒ t | t d ƒ | i d
 d
 ƒ d GHt | i ƒ  d
 ƒ | i d d ƒ d GHt | i ƒ  d ƒ | i d
 d ƒ d GHt | i ƒ  t | ƒ ƒ d GHy | i d ƒ Wn t j
 o n Xt d
 d ƒ d  GHy | i d d ƒ Wn t j
 o n Xt d
 d ƒ d GHy | i t | ƒ d d ƒ Wn t j
 o n Xt d
 d ƒ d! GHy | i  d" ƒ Wn t! j
 o n_ Xt t | ƒ d" j d# t | ƒ f ƒ y | i d$ d
 ƒ Wn t j
 o n Xt d
 d% ƒ | i ƒ  Wd& y | i ƒ  Wn t" j
 o n Xy t  i t ƒ Wn t" j
 o n XXz.d' } d( G| Gd) GHt t d* ƒ i d+ | ƒ d, GHt t d- ƒ } t	 i	 | i
 ƒ  | d. t	 i$ ƒ} t | d+ | j d/ ƒ d0 GHy d1 | | (Wn t% j
 o n Xt d
 d2 ƒ d3 GHy d1 | d
 <Wn t% j
 o n Xt d
 d2 ƒ d4 GHy! | i d
 d
 ƒ | i d5 ƒ Wn t% j
 o n Xt d
 d2 ƒ d6 GHy! | i d
 d
 ƒ | i& d7 ƒ Wn t% j
 o n Xt d
 d2 ƒ d8 GHy | i  d | ƒ Wn% t! j
 o n! t% j
 o n Xt d
 d9 ƒ ~ ~ t t t d- ƒ i' ƒ  d+ | j d: ƒ d; GHt t d< ƒ } t	 i	 | i
 ƒ  | d. t	 i( ƒ} d= GHd> | | (t | d> | j d? ƒ | i ƒ  ~ ~ t t t ƒ i' ƒ  d> | j d@ ƒ dA GHt t d< ƒ } t	 i	 | i
 ƒ  | d. t	 i) ƒ} dB GHd7 | | (t | d7 | j dC ƒ | i ƒ  t t t d- ƒ i' ƒ  d> | j dD ƒ y dE GH| i  d | ƒ Wn t% j
 o n Xt d
 dF ƒ ~ ~ y6 dG GHt t d< ƒ } t	 i	 | i
 ƒ  | d. dH ƒ} Wn t j
 o n Xt d
 dI ƒ t  i* dJ j om t t d< ƒ } y7 t	 i	 | i
 ƒ  | dK t	 i+ dL t	 i, d. t	 i( ƒ} Wn t j
 o n Xt d
 dM ƒ n Wd& y t  i t ƒ Wn t" j
 o n XXt t d ƒ } zÄ dN } t | ƒ } | i | ƒ t	 i	 | i
 ƒ  | ƒ } | i ƒ  x| t/ | d ƒ D]j } xa t/ | | d ƒ D]L }  | | |  !} t | i | ƒ | i | ƒ ƒ t | i | dO ƒ d ƒ q|	Wqb	WWd& y t  i t ƒ Wn t" j
 o n XXdP GHd& S(Q   s,   Test mmap module on Unix systems and Windowss   w+s    s   fooi   i   s     Position of foo:s   pagess     Length of file:s     Contents of byte 0:i    s     Contents of first 3 bytes:s      s   
  Modifying file's content...s   3s   bars   3  s     Contents of second page:i   i   s    foobar s	   [A-Za-z]+s$     ERROR: regex match on mmap failed!s4     Regex match on mmap (page start, length of match):i   s     Seek to zeroth bytei*   s     Seek to 42nd bytes     Seek to last bytes%     Try to seek to negative position...iÿÿÿÿs(   expected a ValueError but did not get its#     Try to seek beyond end of mmap...s     Attempting resize()i   s   len(m) is %d, but expecting 512i  s   Could seek beyond the new sizeNi
   s
     Creatings   byte test data file.s   wbs   as&     Opening mmap with access=ACCESS_READs   rbs   accesss#   Readonly memory map data incorrect.s6     Ensuring that readonly mmap can't be slice assigned.s   bs$   Able to write to readonly memory maps5     Ensuring that readonly mmap can't be item assigned.s2     Ensuring that readonly mmap can't be write() to.s   abcs7     Ensuring that readonly mmap can't be write_byte() to.s   ds/     Ensuring that readonly mmap can't be resized.s"   Able to resize readonly memory maps*   Readonly memory map data file was modifieds'     Opening mmap with access=ACCESS_WRITEs   r+bs%     Modifying write-through memory map.s   cs5   Write-through memory map memory not updated properly.s8   Write-through memory map data file not updated properly.s&     Opening mmap with access=ACCESS_COPYs%     Modifying copy-on-write memory map.s4   Copy-on-write memory map data not written correctly.s4   Copy-on-write test data file should not be modified.s0     Ensuring copy-on-write maps cannot be resized.s2   Copy-on-write mmap resize did not raise exception.s5     Ensuring invalid access parameter raises exception.i   s1   Invalid access code should have raised exception.s   posixs   flagss   prots0   Incompatible parameters should raise ValueError.s   aabaac deef  aa s   xs    Test passed(2   s   oss   paths   existss   TESTFNs   unlinks   opens   fs   writes   PAGESIZEs   mmaps   filenos   ms   closes   types   finds   floats   vereqs   lens   reprs   flushs   res   searchs   matchs   Nones   spans   starts   ends   lengths   seeks   tells
   ValueErrors   verifys   resizes   SystemErrors   OSErrors   mapsizes   ACCESS_READs	   TypeErrors
   write_bytes   reads   ACCESS_WRITEs   ACCESS_COPYs   names   MAP_PRIVATEs	   PROT_READs   datas   ns   ranges   finishs   slice(   s   finishs   ns   ends   slices   fs   mapsizes   ms   starts   datas   lengths   match(    (    s$   /usr/lib/python2.2/test/test_mmap.pys	   test_both s    
 

	
 !!
!
" 
  & (	   s   test_supports   verifys   vereqs   TESTFNs   mmaps   oss   res   PAGESIZEs	   test_both(   s   res	   test_boths   vereqs   PAGESIZEs   mmaps   verifys   oss   TESTFN(    (    s$   /usr/lib/python2.2/test/test_mmap.pys   ? s   			ÿ 