-
<c       sf      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 |  GH d G| i d  t t  Gd GH t | i d  t   d Gt |  t t  Gd GH t t |  d t  ! d	 Gt | d
  GH" t | d
 d  # d Gt | d
 d ! GH$ t | d
 d !d  ' d GH( d | d
 <) d | t d t d d +, d	 Gt | d
  GH- t | d
 d  . d Gt | d
 d ! GH/ t | d
 d !d  0 d Gt | t d t d ! GH1 t | t d t d !d  3 | i   6 t i d |  }
 7 |
 t j o 8 d GHng : |
 i d
  \ } } ; | | }	 = d G> | t t  G|	 GH@ t | t  A t | t d  D | i d
 d
  E d GHF t | i   d
  G | i d d  H d GHI t | i   d  J | i d
 d  K d GHL t | i   t |   N d GHO y P | i d  Wn Q t j
 o
 R n XT t d
 d  V d  GHW y X | i d d  Wn Y t j
 o
 Z n X\ t d
 d  ^ d GH_ y" ` | i t |  d d  Wn a t j
 o
 b n Xd t d
 d  g d! GHh y i | i  d"  Wn j t! j
 o
 n nt Xq t t |  d" j r d# t |  f  t y u | i d$ d
  Wn v t j
 o
 w n Xy t d
 d%  { | i   Wd& } ~ y  | i   Wn  t" j
 o
  n X y  t  i t  Wn  t" j
 o
  n XX z3 d' }  d( G| Gd) GH t t d*  i d+ |   d, GH t t d-  }  t	 i	 | i
   | d. t	 i$ }  t | d+ | j d/   d0 GH y  d1 | | (Wn  t% j
 o
  n X t d
 d2   d3 GH y  d1 | d
 <Wn  t% j
 o
  n X t d
 d2   d4 GH y'  | i d
 d
   | i d5  Wn  t% j
 o
  n X t d
 d2   d6 GH y'  | i d
 d
   | i& d7  Wn  t% j
 o
  n X t d
 d2   d8 GH y  | i  d |  Wn1  t! j
 o
  n*  t% j
 o
  n X t d
 d9   ~ ~  t t t d-  i'   d+ | j  d:   d; GH t t d<  }  t	 i	 | i
   | d. t	 i( }  d= GH d> | | ( t | d> | j  d?   | i    ~ ~  t t t  i'   d> | j  d@   dA GH t t d<  }  t	 i	 | i
   | d. t	 i) }  dB GH d7 | | ( t | d7 | j  dC   | i    t t t d-  i'   d> | j  dD   y   dE GH | i  d |  Wn  t% j
 o
  n X t d
 dF   ~ ~  y?  dG GH t t d<  }  t	 i	 | i
   | d. dH } Wn  t j
 o
  n X t d
 dI   t  i* dJ j o  t t d<  }  y=  t	 i	 | i
   | dK t	 i+  dL t	 i, d. t	 i( } Wn  t j
 o
  n X t d
 dM  n Wd&   y  t  i t  Wn  t" j
 o
  n XX t t d  }  z  dN }  t |  }  | i |   t	 i	 | i
   |  }  | i   x t/ | d  D]y } xm t/ | | d  D]U }  | | |  !} t | i |  | i |   t | i | dO  d  qWqWWd& 	y 
t  i t  Wn t" j
 o
 n XXdP 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...is(   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    