mò %U²Ic@sQdklZlZlZdkZdkZdkZeiZd„ZeƒdS((sverifysvereqsTESTFNNc CsO tiitƒotitƒnttdƒ}z…|idtƒ|idƒ|idtdƒ|i ƒt i |i ƒdtƒ} |i ƒt| ƒGHdG| idƒttƒGdGHt| idƒtƒdGt| ƒttƒGdGHtt| ƒdtƒd Gt| d ƒGHt| d dƒd Gt| d d!ƒGHt| d d!d ƒd GHd| d ƒ}y t i |i ƒ| dƒ} Wn7tj o+|i*i+d?ƒotd d@ƒq£n0X|i*i+d?ƒptd dAƒn| i ƒ|i ƒ|i*i+d?ƒo*ttd>ƒ}|i,| ƒ|i ƒndBGHttd>ƒ}t i |i ƒ| d0t i-ƒ} dCGHdD| | (t| dD| jdEƒ| i ƒ| i ƒ|i ƒttd/ƒ}|i(ƒ} |i ƒt| dD| jdFƒdGGHttd>ƒ}t i |i ƒ| d0t i/ƒ} dHGHd9| | (t| d9| jdIƒ| i ƒtttd/ƒi(ƒdD| jdJƒydKGH| i d| ƒWnt&j onXtd dLƒ~ ~y6dMGHttd>ƒ}t i |i ƒ| d0dNƒ} Wntj onXtd dOƒti0dPjowttd>ƒ}y7t i |i ƒ| dQt i1dRt i2d0t i-ƒ} Wntj onXtd dSƒ|i ƒnWd(ytitƒWnt#j onXXdTGHyt i ddUƒWnt i3j onXtd dVƒttdƒ}zØdW}t|ƒ} |i|ƒ|i ƒt i |i ƒ| ƒ} |i ƒx|t6| dƒD]j}xat6|| dƒD]L}|||!}t| i|ƒ|i|ƒƒt| i|dXƒdƒqD Wq* W| i ƒWd(titƒXttdƒ}zr|iddYd-ƒ|i ƒttƒ}t i |i ƒddYd0t i%ƒ}|i ƒ|i ƒ|i ƒWd(titƒXdZGHd(S([s,Test mmap module on Unix systems and Windowssw+ttfooiis Position of foo:tpagess Length of file:s Contents of byte 0:is Contents of first 3 bytes:ts Modifying file's content...t3tbart3s Contents of second page:iitfoobars [A-Za-z]+s$ ERROR: regex match on mmap failed!s4 Regex match on mmap (page start, length of match):is 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()islen(m) is %d, but expecting 512isCould seek beyond the new sizesUnderlying file not truncatedsNew size not reflected in fileNi s Creatingsbyte test data file.twbtas& Opening mmap with access=ACCESS_READtrbtaccesss#Readonly memory map data incorrect.s6 Ensuring that readonly mmap can't be slice assigned.tbs$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.tabcs7 Ensuring that readonly mmap can't be write_byte() to.tds/ 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 size too bigsr+btwins0Opening mmap with size+1 should work on Windows.s1Opening mmap with size+1 should raise ValueError.s' Opening mmap with access=ACCESS_WRITEs% Modifying write-through memory map.tcs5Write-through memory map memory not updated properly.s8Write-through memory map data file not updated properly.s& Opening mmap with access=ACCESS_COPYs% Modifying copy-on-write memory map.s4Copy-on-write memory map data not written correctly.s4Copy-on-write test data file should not be modified.s0 Ensuring copy-on-write maps cannot be resized.s2Copy-on-write mmap resize did not raise exception.s5 Ensuring invalid access parameter raises exception.is1Invalid access code should have raised exception.tposixtflagstprots0Incompatible parameters should raise ValueError.s& Try opening a bad file descriptor...is(expected a mmap.error but did not get ittaabaacdeefaatxis Test passed(:tostpathtexiststTESTFNtunlinktopentftwritetPAGESIZEtflushtmmaptfilenotmtclosettypetfindtfloattvereqtlentreprtretsearchtmatchtNonetspantstarttendtlengthtseekttellt ValueErrortverifytresizet SystemErrortsizetOSErrortmapsizet ACCESS_READt TypeErrort write_bytetreadtsystplatformt startswithttruncatet ACCESS_WRITEtstufft ACCESS_COPYtnamet MAP_PRIVATEt PROT_READterrortdatatntrangetfinishtslicetmf(R0R/ROR,RMR?RNRJRR:R"RKR1RD((t+/data/zmath/lib/python2.4/test/test_mmap.pyt test_bothsæ                  !          !      !   "        "  %  ( ttest.test_supportR5R'RR RR*RRQ(R'RR5R*RQR RR((RPt?s    ÿG