%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/test_imageop.pyc

ó
Nęáac	@sdZddlmZmZmZmZeddeƒZddlZddl	Z	ddl
Z
dZddddddd d"fZe
d
„eeƒDƒƒd#eZddZd$Zde
jfd„ƒYZd„Zd„Zd„ZedkreƒndS(%s„Test script for the imageop module.  This has the side
   effect of partially testing the imgfile module as well.
   Roger E. Masse
i˙˙˙˙(tverbosetunlinkt
import_moduletrun_unittesttimageopt
deprecatedNiiiii
iiccs|]}|VqdS(N((t.0tx((s-/usr/local/lib/python2.7/test/test_imageop.pys	<genexpr>sitAiitInputValidationTestscBs/eZdd„Zd„Zd„Zd„ZRS(c
GsÔtt|ƒ}xžtD]ś}x­tD]Ľ}t||ƒ}|rL||9}n|tkred|}nt}|rŠ||||f|}	n|||f|}	y||	ŒWq#ttjfk
rÇq#Xq#WqWdS(NR(tgetattrRtVALUEStabstMAX_LENtAAAAAt
ValueErrorterror(
tselftnametsizetextratfunctheighttwidthtstrlentdatat	arguments((s-/usr/local/lib/python2.7/test/test_imageop.pyt_checks 



cGs(x!tD]}|j|||ŒqWdS(N(tSIZESR(RRRR((s-/usr/local/lib/python2.7/test/test_imageop.pyt
check_size)s
cGs|j|d|ŒdS(N(RtNone(RRR((s-/usr/local/lib/python2.7/test/test_imageop.pytcheck-scCs|jdddddƒ|jdddƒ|jdddƒ|jdƒ|jddƒ|jd	ƒ|jd
ƒ|jdƒ|jdƒ|jd
ddƒ|jdƒ|jdƒ|jdƒ|jdƒ|jdƒ|jtjƒtjddddƒWdQXdS(Ntcropitscaleii˙˙˙˙ttovideot	grey2monoi€t
grey2grey4t
grey2grey2tdither2monotdither2grey2t	mono2greyt
grey22greytrgb2rgb8trgb82rgbtrgb2greytgrey2rgbRii(RRtassertRaisesRRR-(R((s-/usr/local/lib/python2.7/test/test_imageop.pyttest_input_validation0s"









N(t__name__t
__module__RRRRR/(((s-/usr/local/lib/python2.7/test/test_imageop.pyR	s		c	CsĹttƒyddl}Wntk
r.dSXtjtdtjdƒdtjdƒt	dtjdƒ\}}}t
r‰dGHntj|d||ddd	d	ƒ}t
rťd
GHntj
|d||d	d	ƒ}t
rçdGHntj|d||ƒ}t
r
dGHntj|||ƒ}t
r0d
GHntj|||ƒ}t
rSdGHntj|||ƒ}t
rvdGHntj|||ƒ}t
r™dGHntj|||dƒ}t
rżdGHntj|||ddƒ}t
rčdGHntj|||ƒ}t
rdGHntj|||ƒ}	t
r.dGHntj|||ƒ}
t
rQdGHntj|||ƒ}
t
rtdGHntj|	||ƒ}t
r—dGHntj|
||ƒ}tdtjdƒdS(Ni˙˙˙˙ttestrgbtuuettesttrgbR iiiR!R"R*R+R,R-R#R(i˙R&R$R%R't
grey42greyR)(RR	timgfiletImportErrortuutdecodetget_qualified_pathtostextseptgetimageRRR R!R"R*R+R,R-R#R(R&R$R%R'R6R)R(R7timageRRtnewimaget
scaleimaget
videoimaget	greyimaget	monoimaget
grey4imaget
grey2image((s-/usr/local/lib/python2.7/test/test_imageop.pyt	test_mainDsj

, $cCs“ddl}y|j|ƒ}Wn/|jk
rPt|ƒ}|j|ƒ}nXtrod|t|ƒfGHn|j|ƒ}||d|dfS(sUreturn a tuple consisting of
       image (in 'imgfile' format) width and height
    i˙˙˙˙Ns)imgfile opening test image: %s, sizes: %sii(R7tgetsizesRR;Rtstrtread(RR7tsizesR?((s-/usr/local/lib/python2.7/test/test_imageop.pyR>łscCs’ddl}ddl}|j}y|jjtƒg|}Wntk
rQnXx9|D]1}|jj||ƒ}|jj|ƒrY|SqYW|S(s% return a more qualified path to namei˙˙˙˙N(tsysR<tpathtdirnamet__file__t	NameErrortjointexists(RRLR<RMtdirtfullname((s-/usr/local/lib/python2.7/test/test_imageop.pyR;Ăs	

t__main__(iiiiii€i˙i€i€i€I€iţ˙˙I€i˙˙˙(ii(t__doc__ttest.test_supportRRRRtTrueRR9R<tunittestRt_VALUESttupletreversedRRR
tTestCaseR	RGR>R;R0(((s-/usr/local/lib/python2.7/test/test_imageop.pyt<module>s"$$
1	o		

Zerion Mini Shell 1.0